diff options
| author | qhukz13 <v.onashchuk@gmail.com> | 2026-11-25 18:05:43 +0200 |
|---|---|---|
| committer | qhukz13 <v.onashchuk@gmail.com> | 2026-11-25 22:08:38 +0200 |
| commit | 9a375a064e34de20e531dc916e706462297e5fa3 (patch) | |
| tree | 99635e9b01eaba05873e62dcb2c5362b38d5f161 /runtime/src/main.cpp | |
| parent | 9f9a7c5f30f8559c52675780cf84004571b8d6e5 (diff) | |
d3d12: support depth-stencil UAVs for D24S8-made Xbox D16S8 (format 118)
On GPUs with native VK_FORMAT_D24_UNORM_S8_UINT attachments (NVIDIA),
pc_format() maps Xbox format 118 (D16_UNORM_S8_UINT) to
DXGI_FORMAT_D24_UNORM_S8_UINT before Resource construction. Previously,
Resource::enable_depth_stencil_uav only accepted R16_TYPELESS, 118, and
R32G8X24_TYPELESS, returning E_INVALIDARG so slots 76 and 133 fell back
to creating the texture without unordered access (#1558).
Track console format 118 origin on Resource before pc_format(), extend
enable_depth_stencil_uav and CreateUnorderedAccessView to serve D24S8-made
118 through the existing widened R16_TYPELESS (R16_UINT/R16_UNORM views)
plus R8_UINT storage planes and R32_FLOAT conversion image, and convert
plane-0 D24 depth words in transfer scratch to/from R32_SFLOAT via the
existing Depth24Converter compute pass in copy_depth_uav. Add
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT to copy scratch, accept D16S8/D24S8
castable lists in castable_view_formats, and keep #1558's refusal fallback
in d3d12_xs_device.cpp for any other provider refusal.
Replace xbox_d16s8_refused_uav with xbox_d16s8_d24_storage covering slot 76
6-layer round-trips, slot 133 1280x720 placement, CreateCommittedResource3
castable formats, R16_UNORM/R16_UINT/R8_UINT UAV clears, and direct D24S8
parent attachment readback.
Verified on Windows 10 19045 / GeForce GTX 1050 Ti (NVIDIA 582.66):
17/17 related CTests pass plain and with LEONIDA_VK_VALIDATION=1 (0
validation errors).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/main.cpp')
0 files changed, 0 insertions, 0 deletions