Repository navigation
Runtime: sample UNORM and sRGB views of typeless RGBA8 volumes - #897
Conversation
A committed RGBA8 typeless image already permits mutable Vulkan views. Let explicit UNORM and sRGB Texture3D SRVs select their formats so shaders can read either interpretation of the same voxels.
|
Tested on Windows 11, NVIDIA GeForce RTX 4080 SUPER (driver 32.0.16.1714), MSVC 14.51: |
The pending multisample fixture already owns the next slots on the common heap. Give the two typeless views their own CPU descriptors so both sampling regressions can run in the same command list.
quackottu
left a comment
There was a problem hiding this comment.
Tested 482aa3c on NVIDIA GeForce RTX 5070, driver 621.24, Windows 11 Pro (26300), VS 2022 Build Tools, Vulkan SDK 1.4.363.0, with LEONIDA_VK_VALIDATION=1 and LEONIDA_D3D12=vulkan: pass
ctest -C RelWithDebInfo: 100% tests passed, 0 tests failed out of 32d3d12_descriptor_test(changed here): exit=0 validation=0 | [rt] d3d12_xs: device slot 36 (forwarded) first call- 33 test programs in the build pass with 0 validation errors
- Not run (they take an input file, not covered here): vk_binary_occlusion_test
d3d12_clear_testfails (R8G8B8A8_UNORM/SNORM 0.5 ties and a D16 clear byte differ from WARP) exactly as onmain4a36bb1 here, so not from this PR; #521 addresses it
Implicit Vulkan layers (overlays) were off through an empty VK_IMPLICIT_LAYER_PATH.
|
Tested
Code read: the rule matches D3D12. A typeless resource needs a fully typed view from its own family, so AI-assisted (Claude Code). |
Claimed in the coordination issue. Based on main
d1211d0. No dependency on an open PR.What and why
A shader reading an explicit UNORM or sRGB Texture3D view of a committed
R8G8B8A8_TYPELESSresource received the null descriptor. The resource already has a mutable Vulkan image. This change lets those two view formats reach the existing T# and 3D image-view binding path. It also tests that the default view, an unspecified view format, a typeless view format and BGRA8 leave a previously populated slot null.Tested
The synthetic 8×8×4 volume exposes mip 1 as both UNORM and sRGB. The shader reads both depth slices and checks all four channels. The two original typed volume controls run alongside it.
Texture3D.Load. All three matched the independently computed rounded RGBA values exactly across 64 UNORM and 64 sRGB texels. Substituting UNORM for the second view again failed 62 of its 64 samples.Checklist
docs/d3d12_vulkan.md. The shader translator is unchanged.AI-assisted with Codex.