Repository navigation
xbox_present: record measured Device (78-81) and Queue (23, 24, 32) vtable slots - #512
kotekompotek wants to merge 2 commits into
Conversation
|
Review of head Environment: Linux (WSL2). I only read the code. The xbox_present shims are Windows-only, so I built nothing. Findings (needs change):
Plausibility check (reasoning, not executed): the public Not tested: any build or run. The xbox_present targets need Windows/MSVC. Review written by Claude (Claude Code, Opus 5.5), an AI agent, posted from a contributor's account. |
8ec704a to
b9ffaa5
Compare
|
Re-review of head What I re-checked: the diff of Earlier remarks:
Still open: the method attribution in point 1, a rebase onto current AI-assisted. |
|
Closing as superseded by merged PR #402 ( |
…-81) and Queue (23, 24, 32) vtable slots
Measured on the RDNA2 iGPU (gfx1036, tools/f16_interp_probe.py, 98,304 samples over 12 native draws): the SPI writes P10/P20 for a 16-bit channel as per-half f16 differences (round to nearest even), the weighted sum stays f32, and v_interp_p2_f16 narrows toward zero -- the driver's ISA runs the pair inside s_round_mode 0x000c, so the narrow is toward zero whatever the shader's own MODE writes are. The rdna2 model explains 98,274 of 98,304 samples; the previous translation (f32 deltas, nearest-even narrow) explains 62,226. - Gen.f16_round: f32 -> nearest-f16 value via f16_bits + UnpackHalf2x16 (integer-built bits, so no driver folds the round trip away, ProjectLeonida#512/ProjectLeonida#513); applied to the P1-P0 / P2-P0 deltas of 16-bit-channel reads in attribute(). - v_interp_p2_f16 narrows with f16_bits(rtz=True) and keeps the SHADER-430 partial-write high half via write_lo16. - vk_harness: scan both stages for Float16 / StorageInputOutput16 / Float64 capabilities (77 when the device lacks them), enable the matching Vulkan 1.1/1.2 features, VKH_PC_BYTES to shrink the push-constant range for hand-written fixtures, and VKH_SHADER_INFO to dump the driver's fragment disassembly. - tests/semantic/test_interp_f16_round.py: the two telling cases (f16 delta overflow to inf; toward-zero vs nearest-even tie). - tests/semantic/test_interp_p1lv_f16.py: reference oracle updated to the measured model (f16 deltas, f32 sum, toward-zero narrow). - docs/design.md: 16-bit interpolation row records the SHADER-468 measurements and remaining unverified items. Co-Authored-By: Devin <noreply@cognition.ai>
Measured on the RDNA2 iGPU (gfx1036, tools/f16_interp_probe.py, 98,304 samples over 12 native draws): the SPI writes P10/P20 for a 16-bit channel as per-half f16 differences (round to nearest even), the weighted sum stays f32, and v_interp_p2_f16 narrows toward zero -- the driver's ISA runs the pair inside s_round_mode 0x000c, so the narrow is toward zero whatever the shader's own MODE writes are. The rdna2 model explains 98,274 of 98,304 samples; the previous translation (f32 deltas, nearest-even narrow) explains 62,226. - Gen.f16_round: f32 -> nearest-f16 value via f16_bits + UnpackHalf2x16 (integer-built bits, so no driver folds the round trip away, ProjectLeonida#512/ProjectLeonida#513); applied to the P1-P0 / P2-P0 deltas of 16-bit-channel reads in attribute(). - v_interp_p2_f16 narrows with f16_bits(rtz=True) and keeps the SHADER-430 partial-write high half via write_lo16. - vk_harness: scan both stages for Float16 / StorageInputOutput16 / Float64 capabilities (77 when the device lacks them), enable the matching Vulkan 1.1/1.2 features, VKH_PC_BYTES to shrink the push-constant range for hand-written fixtures, and VKH_SHADER_INFO to dump the driver's fragment disassembly. - tests/semantic/test_interp_f16_round.py: the two telling cases (f16 delta overflow to inf; toward-zero vs nearest-even tie). - tests/semantic/test_interp_p1lv_f16.py: reference oracle updated to the measured model (f16 deltas, f32 sum, toward-zero narrow). - docs/design.md: 16-bit interpolation row records the SHADER-468 measurements and remaining unverified items. Co-Authored-By: Devin <noreply@cognition.ai>
Records the measured Xbox GDKX 0-based vtable slots in
runtime/shims/xbox_present.h(both in the slot table comment and asinline constexpr unsignedconstants innamespace rt::d3d12):ID3D12Device(Xbox):SetFrameIntervalX = 78(0x270),ScheduleFrameEventX = 79(0x278),WaitFrameEventX = 80(0x280),GetFrameStatisticsX = 81(0x288)ID3D12CommandQueue(Xbox):SuspendX = 23(0x0b8),ResumeX = 24(0x0c0),PresentX = 32(0x100)Verified locally with
cmake --build ... --target xbox_present_test xbox_present_readback_size_testandctest -R xbox_present(2/2 Passed).