build: OFFSCREEN_AGILITY_620_DIR builds fail on a 40-byte view-description static_assert #3165

Closed
opened 2026-11-27 19:37:54 +00:00 by Not-Saii · 0 comments
Not-Saii commented 2026-11-27 19:37:54 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-27T19:37:54Z.


Reproduction

Current main (88cddb09), Windows 11 build 26300, MSVC 14.44.35207, Windows SDK 10.0.26100, Agility SDK 1.620.2 from nuget.org (sdk.nupkg next to its x64 DLLs, as described in docs/experiments.md):

cmake --preset dev -B out/build/warp122 -DOFFSCREEN_AGILITY_620_DIR=<agility dir> -DOFFSCREEN_WARP_DIR=<warp dir>
cmake --build out/build/warp122 --target offscreen_check startup_stream_consumer

Expected and observed

Expected: both targets build, as they did when #147 was merged.

Observed: d3d12_xs_device.cpp fails in both d3d12_xs_shim and offscreen_check:

src\startup_stubs/d3d12_compute_dispatch.inl(353): error C2607: static assertion failed

That line is static_assert(sizeof(D3D12_SHADER_RESOURCE_VIEW_DESC) == 40 && sizeof(D3D12_UNORDERED_ACCESS_VIEW_DESC) == 40);, added in #2532. The option puts the Agility SDK 1.620 headers first on the include path of these two targets. With them, D3D12_UNORDERED_ACCESS_VIEW_DESC is 48 bytes, because the new D3D12_BUFFER_UAV_BYTE_OFFSET union member is larger than any member of the desktop SDK union. D3D12_SHADER_RESOURCE_VIEW_DESC stays 40 bytes (measured with sizeof against both header sets).

The default build (option unset) is unaffected. Every opt-in Agility build is affected, including the offscreen_check WARP checks from #147 (bvh_wave64_warp, dxr_query_warp and the others) and every test that runs startup_stream_consumer.

Notes

The view record copies the title's description bytes (record.desc_bytes >= sizeof(desc)), so making the buffer 48 bytes would also change, for UAVs, which descriptions count as "described". A fix probably needs to separate the size of the title layout (40 bytes) from the size of the header struct. I have not written one.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6653345674 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3165). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-11-27T19:37:54Z. --- ## Reproduction Current `main` (`88cddb09`), Windows 11 build 26300, MSVC 14.44.35207, Windows SDK 10.0.26100, Agility SDK 1.620.2 from nuget.org (`sdk.nupkg` next to its x64 DLLs, as described in `docs/experiments.md`): ```powershell cmake --preset dev -B out/build/warp122 -DOFFSCREEN_AGILITY_620_DIR=<agility dir> -DOFFSCREEN_WARP_DIR=<warp dir> cmake --build out/build/warp122 --target offscreen_check startup_stream_consumer ``` ## Expected and observed Expected: both targets build, as they did when #147 was merged. Observed: `d3d12_xs_device.cpp` fails in both `d3d12_xs_shim` and `offscreen_check`: ```text src\startup_stubs/d3d12_compute_dispatch.inl(353): error C2607: static assertion failed ``` That line is `static_assert(sizeof(D3D12_SHADER_RESOURCE_VIEW_DESC) == 40 && sizeof(D3D12_UNORDERED_ACCESS_VIEW_DESC) == 40);`, added in #2532. The option puts the Agility SDK 1.620 headers first on the include path of these two targets. With them, `D3D12_UNORDERED_ACCESS_VIEW_DESC` is 48 bytes, because the new `D3D12_BUFFER_UAV_BYTE_OFFSET` union member is larger than any member of the desktop SDK union. `D3D12_SHADER_RESOURCE_VIEW_DESC` stays 40 bytes (measured with `sizeof` against both header sets). The default build (option unset) is unaffected. Every opt-in Agility build is affected, including the `offscreen_check` WARP checks from #147 (`bvh_wave64_warp`, `dxr_query_warp` and the others) and every test that runs `startup_stream_consumer`. ## Notes The view record copies the title's description bytes (`record.desc_bytes >= sizeof(desc)`), so making the buffer 48 bytes would also change, for UAVs, which descriptions count as "described". A fix probably needs to separate the size of the title layout (40 bytes) from the size of the header struct. I have not written one. AI-assisted.
Sign in to join this conversation.
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#3165
No description provided.