GPU: accept a cached mesh pixel stage with a writable depth-only target #2456

Merged
R0Y00 merged 1 commit from upstream-pr/2464 into main 2026-11-25 17:28:13 +00:00
R0Y00 commented 2026-11-25 17:24:54 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T17:24:54Z.


What changed

Accept a cached mesh PSO with a pixel stage and zero color targets when the stream declares a valid writable depth attachment. A stream with color targets still needs a pixel stage. The existing MS-only WARP restriction remains in place.

Verification

On Windows 11 26200.9974 with the D3D12 debug layer enabled, the source-built cached slot 86 fixture obtains the native PSO and calls the normal guest ExecuteIndirect entry point. Its pixel stage writes SV_Depth = 0.25 on the left half and discards the right half. The RTX 4060 Laptop (32.0.16.1656) and WARP (10.0.26100.9818) both read back four D16 words of 0x4000 and four clear words of 0xffff.

A ready cache with zero color targets and no DSV, or a DSV with depth writes disabled, produces no native PSO and leaves depth clear. The missing-attachment and incomplete-constants controls also leave depth clear. The existing three-target and no-pixel depth controls run alongside them.

cmake --build --preset release --target startup_indirect_draw_indexed
ctest --preset release --no-tests=error -j 1 -R '^startup_indirect_(mesh|mesh_cache|mesh_console|mesh_amplified)_(hardware|warp)$' -V
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6609948536 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2464). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T17:24:54Z. --- ## What changed Accept a cached mesh PSO with a pixel stage and zero color targets when the stream declares a valid writable depth attachment. A stream with color targets still needs a pixel stage. The existing MS-only WARP restriction remains in place. ## Verification On Windows 11 26200.9974 with the D3D12 debug layer enabled, the source-built cached slot 86 fixture obtains the native PSO and calls the normal guest ExecuteIndirect entry point. Its pixel stage writes SV_Depth = 0.25 on the left half and discards the right half. The RTX 4060 Laptop (32.0.16.1656) and WARP (10.0.26100.9818) both read back four D16 words of 0x4000 and four clear words of 0xffff. A ready cache with zero color targets and no DSV, or a DSV with depth writes disabled, produces no native PSO and leaves depth clear. The missing-attachment and incomplete-constants controls also leave depth clear. The existing three-target and no-pixel depth controls run alongside them. ```powershell cmake --build --preset release --target startup_indirect_draw_indexed ctest --preset release --no-tests=error -j 1 -R '^startup_indirect_(mesh|mesh_cache|mesh_console|mesh_amplified)_(hardware|warp)$' -V ```
upstream-sync closed this pull request 2026-11-25 18:01:13 +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!2456
No description provided.