Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/d3d12_vulkan.md
Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,16 @@ The console has two list topologies Vulkan lacks: rectangle list (`IASetPrimitiv
- `CopyTiles` transfers RGBA8 tiles in either direction. Partial edge blocks use the full 512-byte linear row
pitch and transfer only in-bounds texels. Byte-unaligned offsets use transfer scratch.
`d3d12_texture_tiles_test` compares initially unmapped tiles, column mappings, aliases, and a fence-delayed
remap with native D3D12, including clipped edges and byte-unaligned offsets.
remap with native D3D12, including clipped edges at 4-byte and byte-unaligned offsets. `CopyTiles` documents no
alignment for `BufferStartOffsetInBytes`; at a byte-unaligned offset WARP also runs, to confirm the test's
expectations (it meets them at every offset tried, 1-8), and the layer is held to them. Two Windows D3D12
drivers measured so far do not. Judging by the texel values (the D3D12 debug layer was not run), they move
whole tiles as if the offset were rounded down to a multiple of 4. AMD's (RX 7900 XT, 26.11.2) does so in both
directions, so a row-major copy finds each texel 1-3 bytes early and texels that straddle a tile seam differ in
the `CopyTiles` reads. Intel's (Iris Xe, 32.0.101.7092, measured on that host in #964) does so only in the
tiles-to-buffer copies, so the row-major copy matches and the `CopyTiles` reads of every nonzero texel differ.
The test prints a note when every checked read of a native run matches one of those two models, the same one
for every case on the device, and fails on any other divergence ([testing.md](testing.md#known-problems)).
- `D3D12_RESOURCE_DESC::Layout`: the public `ROW_MAJOR` and `64KB_STANDARD_SWIZZLE` values plus the Xbox `0x101`
tiled value from slot 76. Row-major textures need `VK_IMAGE_TILING_LINEAR` (not usable for RT/DS) or a staging
copy; `64KB_STANDARD_SWIZZLE` and `0x101` have no direct Vulkan equivalent. If the game uploads console-tiled data,
Expand Down
1 change: 1 addition & 0 deletions docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,7 @@ game's device ignores it`, so leaving them set cannot slow a game down (`run_tin
| With `--wave64-emulate` (or `LEONIDA_W64_EMULATE=1`) on an NVIDIA RTX 5080 with Windows driver 32.0.16.1692 (616.92), `crosslane_fuzz.py --seed 91001 --dpp --no-maskdata` reports a hard mismatch for `cs_xl64_9100373886`: after `s_xor_b64 s[16:17], vcc, vcc` (0 in every lane), the second of two nested `v_cndmask_b32_e64 … s[16:17]` returns the old register instead of the lane id | An NVIDIA driver miscompile, not the translator (SHADER-720). The same SPIR-V (spirv-val clean) matches the model on an RTX 3060 with 616.64, an RTX 5060 Ti (Blackwell) with 621.14, an RTX 5070 Ti with 621.24 and an RTX 5080 with the Linux 580.65.06 driver. Hand edits narrow it to a value selected through the `%active` gate of a store; on the Linux 580 driver a similar pattern, a subgroup shuffle selected by an `%active` that is false, still fails in three wave32 `v_permlane16`/`v_permlanex16` programs of the same seed (#3796, #3918) | Update the NVIDIA driver to 621.14 or newer on Windows. If a crosslane mismatch only shows on one driver, check another driver or GPU before changing the translator |
| `lds_fuzz.py --wave 64` (native, not `--emulate`) reports a `ds_bpermute_b32` mismatch on an AMD GPU on Windows, e.g. `cs_ldsfuzz_s7031_496_w64` (seed 7031): small values like `0x14` where the model wants another lane's data, while `--oracle hw` and `--emulate` on another GPU agree with the model | The AMD Windows driver (32.0.21042.62, gfx1036) miscompiles a native wave64 compute shader with two subgroup shuffles; a reduced SPIR-V module is in #4613 | Not a translator regression: check the same seed with `--oracle hw` and with `--emulate`. Native wave64 results on that driver need that cross-check |
| On AMD's Windows driver a compute pipeline creation takes tens of minutes: `vk_pipeline_check` prints `still compiling <name> after ...s` with one busy thread, or a compute PSO creation through the D3D12 layer seems never to return | The driver's compiler on one module in the dispatch-loop form (`"control_flow": "dispatch loop"` in the translated `index.json`). Measured on a Radeon gfx1036 iGPU, driver 32.0.21042.62 (SHADER-995): `XboxBvhBuilder.dll`'s `LeafRehydration` in that form (a 581-case switch in a loop) was created after 34 minutes of one busy thread (XXTESTING), while its structured module is created in 2.9 s and an RTX 3070 (NVIDIA 610.74) created the dispatch-loop one in 11 s. It is not every such module: ten other programs of that DLL compile in that form on the Radeon in 0.4 to 40 s ([embedded_shaders.md](embedded_shaders.md), section 7). Not tried on another AMD GPU or driver branch | Translate with current `main`. Since SHADER-427 only a tree nested deeper than 64, a graph that cannot be made reducible or `--dispatch-loop` gives that form, and none of that DLL's programs has it; the shaders stage translates again by itself when the translator changed. A wave64 compute shader that still has it comes out in another form with `--wave64-emulate on` (12.4 s for this program on that driver), which that driver can crash on for other programs (#857) |
| `d3d12_texture_tiles` passes but prints `NOTE: native D3D12 broke the expectations at N of M checked reads, every read as CopyTiles would with linear offset X rounded down to Y in both directions` (or `only in the tiles-to-buffer copies`; Y is X rounded down to a multiple of 4; the test runs X = 1 and 3) | Two Windows D3D12 drivers measured so far run `CopyTiles` at a byte-unaligned `BufferStartOffsetInBytes` as if the offset were rounded down to a multiple of 4: AMD's (RX 7900 XT, 26.11.2, `32.0.32029.2010`) in both directions, Intel's (Iris Xe, `32.0.101.7092`, measured on that host in #964) only in the tiles-to-buffer copies. That is inferred from the texel values; the D3D12 debug layer was not run. A device whose cases match different models fails. `CopyTiles` documents no alignment, WARP meets the test's expectations at every offset tried (1-8), and so does the layer, which stages such offsets through aligned scratch | Nothing: the note is harmless. The test still fails when a native run diverges in any other way, or at a 4-byte offset |

### Signed zero in a float storage image (SHADER-605)

Expand Down
Loading