gpu: ignore padding in mesh slot86 cache keys #2473

Merged
R0Y00 merged 1 commit from upstream-pr/2481 into main 2026-11-25 18:06:50 +00:00
R0Y00 commented 2026-11-25 18:02:04 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T18:02:04Z.


The cached mesh request already clears root and shader pointers and some subobject alignment bytes. It now also clears the padding after each blend target's write mask and between the depth-stencil masks and face descriptors. SampleMask and all existing pipeline state fields stay in the cache key. Previously captured requests with nonzero padding will get a new key and need one new publication.

The source-built fixture publishes a baseline request and replays it with different padding through slot 86 and ExecuteIndirect. Both adapters reuse the cached PSO and read back the expected pixels on all three attachments. Changing one SampleMask bit instead publishes a separate request and leaves the attachments clear. With the previous runtime, the padding-only replay generated a new key and left the first pixel black rather than red.

. ./tools/dev.ps1
cmake --preset release -B out/build/checked -DCMAKE_TRY_COMPILE_CONFIGURATION=Release -DINTAKE_PYTHON=<python.exe>
cmake --build out/build/checked --target startup_indirect_draw_indexed
ctest --test-dir out/build/checked --no-tests=error -R '^startup_indirect_(mesh_cache|mesh|mesh_console|mesh_amplified)_(warp|hardware)$' -V

Windows build 26200, D3D12 debug layer enabled. RTX 4060 Laptop GPU driver 32.0.16.1656 and WARP driver 10.0.26100.9818. All 8 tests passed with no capability skips.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6610592407 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2481). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T18:02:04Z. --- The cached mesh request already clears root and shader pointers and some subobject alignment bytes. It now also clears the padding after each blend target's write mask and between the depth-stencil masks and face descriptors. SampleMask and all existing pipeline state fields stay in the cache key. Previously captured requests with nonzero padding will get a new key and need one new publication. The source-built fixture publishes a baseline request and replays it with different padding through slot 86 and ExecuteIndirect. Both adapters reuse the cached PSO and read back the expected pixels on all three attachments. Changing one SampleMask bit instead publishes a separate request and leaves the attachments clear. With the previous runtime, the padding-only replay generated a new key and left the first pixel black rather than red. ```powershell . ./tools/dev.ps1 cmake --preset release -B out/build/checked -DCMAKE_TRY_COMPILE_CONFIGURATION=Release -DINTAKE_PYTHON=<python.exe> cmake --build out/build/checked --target startup_indirect_draw_indexed ctest --test-dir out/build/checked --no-tests=error -R '^startup_indirect_(mesh_cache|mesh|mesh_console|mesh_amplified)_(warp|hardware)$' -V ``` Windows build 26200, D3D12 debug layer enabled. RTX 4060 Laptop GPU driver 32.0.16.1656 and WARP driver 10.0.26100.9818. All 8 tests passed with no capability skips.
upstream-sync closed this pull request 2026-11-25 19:03:59 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!2473
No description provided.