Repository navigation
Report the single-sample RGB9E5 render targets the backend can actually clear - #1450
Conversation
After the native attachment and feature-mask changes merged, Radeon could create and clear the resource despite a negative capability query. Check the advertised bit against the physical attachment capability before a focused test can skip.
IAmNotSiob
left a comment
There was a problem hiding this comment.
measurements look solid. one design question before this goes in: the comment you removed says the PC runtime doesn't report RENDER_TARGET for RGB9E5, and most of CheckFeatureSupport follows the rule "answer what the host D3D12 runtime answers" (#1388's native readbacks on RDNA2/WARP and the 9070 XT). is reporting more than the host on purpose here? a game probing RGB9E5 RTV support on real D3D12 would get 0 and never take the path, so reporting 1 only matters if something relies on it. if the point is just that the create/clear path works, maybe keep the bit masked and only fix the clear test's skip check? :/ AI-assisted review (Claude Code).
|
Tested ade4aa0 (0 behind main) on two GPUs: Windows 11 Home 10.0.26300, MSVC 14.44 (
So the create/clear path works on an RDNA2 driver too, and both sides of the new check are covered: an adapter with the attachment and one without. No validation messages on either GPU. This only shows what the Vulkan side can do. It doesn't settle IAmNotSiob's host-parity question. AI-assisted (Claude Code). No game files. |
|
@IAmNotSiob, host parity is the reason for restoring this bit. I explicitly selected the hardware IDXGIAdapter1 when calling Windows D3D12CreateDevice. My gfx1036 reported native Support1 0x02e8d3f0 (RENDER_TARGET set), created the 1× RTV and returned both packed colors at all 15 texels. Windows WARP also set the bit and matched all 15. The RTX 5080 reported 0x008013f0 (bit clear) and rejected the same resource with E_INVALIDARG. Native adapter-by-adapter results. On a separate RX 9070 XT, zneel independently got native Support1 0x02e8d3f0 and 15/15 exact texels, and compared the two shim revisions on that same adapter. RX 9070 XT native and shim measurements. The current shim therefore hides a capability of two measured native Windows hardware drivers. A skip-only change would leave their CheckFeatureSupport answer wrong. I agree that host parity on a different adapter still needs its own measurement. The reported R9700/9070 non-XT assertion by itself tells us only what the shim returned; native Support1 and the 1× clear/readback there would distinguish the possibilities. This PR changes only the single-sample RTV bit. AI-assisted. |
|
Tested on Windows 11 with two GPUs on one machine (MSVC 14.51, Windows SDK 10.0.26100): pass. |
|
Tested ade4aa0 merged onto
This fixes the same regression as my #1466, and yours came first and is narrower (only the single-sample RTV bit, blend and MSAA kept masked), so I'm closing #1466 in favour of this one. AI-assisted (Claude Code). |
|
Tested ade4aa0 on RTX 5070 (Blackwell, subgroup 32..32), NVIDIA 616.56, Windows 11 Pro 26200, MSVC 19.50, Vulkan SDK 1.4.363.0: pass.
|
Claimed in the coordination issue.
What and why
Both #1375 and #1388 landed. On bb2e184 the shim could create and clear a native single-sample packed RGB9E5 render target on Radeon, yet its format-support query reported the resource unusable. Applications relying on that query would skip a rendering path that works. The existing UAV test fails on Radeon and the focused clear test incorrectly skips.
Allow the Vulkan-derived RENDER_TARGET bit through for this format. The focused clear checks the physical color attachment capability before deciding whether to skip. Only the single-sample RTV bit changes; the other mask bits from #1388 have independent semantics and are outside this patch.
Tested
I built bb2e184 and ade4aa0 independently on Windows. I also linked a synthetic probe to each build that attempts the 1× RTV resource, full clear, partial clear and packed readback even if the query returned false.
On stock main the existing Radeon UAV test failed the render-target support assertion. With only the strengthened clear test applied, that test also failed instead of skipping. With the fix, both registered tests pass on Radeon (nine outer 0x94010040, six inner 0x91010100). On RTX the UAV test passes and the unavailable RTV skips. Vulkan core and synchronization validation enabled. Native D3D12 readbacks on RDNA2/WARP and an independently measured RDNA4 RX 9070 XT agreed with the same packed patterns.
Checklist
AI assistance was used to implement and verify this change.