Repository navigation
Conversation
A castable list naming a format the host does not have is refused whole, and the texture is then made without castable formats. vkd3d-proton (D3D12 on Vulkan, under Wine and Proton) has no `R10G10B10_XR_BIAS_A2_UNORM`, one of the 4-byte formats `castable` lists, so there every colour texture of that element lost its list, and title textures of one memory in other formats got their own host textures, bridged by copies. `make_texture` now keeps the formats the host reports support for (`CheckFeatureSupport`, asked once per format). A host that has every format, as Windows drivers do, keeps the same lists. New test: a render target with unordered views is castable to the formats of its element the host has. Under vkd3d-proton it fails before this change, and `draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view` passes after it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Do not let one unsupported DXGI format discard the rest of a texture's castable list. Source native vkd3d-proton tests cover the failure. Verified 59 portable GPU tests and the Windows workspace test build cross-check on the merged tree.
|
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at AI-assisted (Claude Code). |
|
Reviewed the I checked the two things a review of this change can check on hardware rather than by reading: whether the filter leaves the Windows lists exactly as they are, and whether the stricter test would have. On this machine (RTX 4090, driver
So the claim in the description holds here — a host that has every format keeps exactly today's lists — and it holds because the test is the loose one. The eight that the cast bit would have dropped are which is exactly the trap: Suggestion, and it is only documentation: say that in Two smaller things, both checked:
What I did not check: the Wine/Proton path, because this machine has no vkd3d-proton. The bug report and the fix are consistent with what vkd3d does (an unknown format refuses the whole No game data is involved: format numbers and support masks. Written with an AI assistant. |
|
Automated triage for the maintainers. In Generated by Claude Code |
What
Under Wine and Proton, which run D3D12 on Vulkan through vkd3d-proton, the first castable colour texture logs:
With
VKD3D_DEBUG=warn, vkd3d-proton gives the reason:d3d12_resource_validate_usage: Unrecognized format #59. The number is hex, so this is format 89,R10G10B10_XR_BIAS_A2_UNORM. vkd3d-proton has no mapping for it; it's the only one of the 21 formatscastable(28)lists that's missing from its format table. One unknown format refuses the whole list. Every colour texture of that element is then made without castable formats, and title textures of one memory in other formats get their own host textures, bridged by copies.Change
make_texturekeeps only the castable formats the host reports support for:CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT)with a non-zeroSupport1, asked once per format and cached. A host that has every format, as Windows drivers do, keeps exactly the lists it has today. A host missing one loses only that format, not every list.Tests
resource::tests::a_colour_target_is_castable_to_the_formats_the_host_has. A 256×256R8G8B8A8_UNORMrender target with unordered access is made castable to the formats of its element that the host has. Under vkd3d-proton it fails onmain, with the warning above, and passes with this change.draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view. That is the case castable formats exist for.In the title, from VIctory's own texture counters in the log, comparing a world run before and after on the same Linux setup:
mainvictory-gputests on Linux, Wine 11.22 + vkd3d-proton master on RADV, RX 9070 XT:main130 ok / 12 failed, this branch 131 ok / 12 failed. The differences are the two tests above, plusdraw::tests::a_depth_texture_written_through_unordered_views_reads_as_depth, which fails onmainhere too when run alone (5 of 5).cargo clippy --workspace --all-targets [--all-features] -- -D warningsis clean.🤖 Generated with Claude Code