Repository navigation
d3d12: R9G9B9E5_SHAREDEXP never reports render-target, blend or MSAA support - #1388
Conversation
|
@Dom-in, I reproduced the same original assertion on another Radeon, then checked the native Windows D3D12 device. On gfx1036 (1002:13c0, driver 32.0.21045.16010), native CheckFeatureSupport reports RENDER_TARGET for DXGI_FORMAT_R9G9B9E5_SHAREDEXP. Native CreateCommittedResource(ALLOW_RENDER_TARGET), CreateRenderTargetView, full clear, partial clear, CopyTextureRegion and readback all work: nine outer texels were 0x94010040 and six rectangle texels were 0x91010100. WARP independently matched all 15. Native RTX 5080 (10de:2c02, 616.92) did not advertise RTV support. The native format query and 15-texel fixture and results are available. At 1040841 this PR masks the feature bits on every device; #1375 allows the actual single-sample native-color-attachment path and keeps the RTX mutable UAV case out of the RTV path. Hard-coding RENDER_TARGET off would hide functionality that native D3D12 exposes on the tested Radeon. Could you run the following on your RX 9070 using a hardware IDXGIAdapter from EnumAdapters1 passed to Windows D3D12CreateDevice? Please report both native Support1/Support2 words, sample-count-1 RTV resource creation, and the two packed colors from the linked check_shared_exponent_target(nativeDevice). The Radeon 9070 Vulkan flags alone do not settle its D3D12 result. I have not measured native blend or multisample behavior on the RX 9070. Additional native measurements on this machine (D3D12CreateDevice per adapter, identical 16×16 ALLOW_RENDER_TARGET resource at each sample count): gfx1036 reports Support1=02e8d3f0, Support2=000002c0; 1x/2x/4x/8x each returned one quality level and resource creation S_OK; 16x returned zero and E_INVALIDARG. WARP (02ecd3f1/000002c0) succeeded through 16x. RTX 5080 (008013f0/00000200) refused all five RTV creations, including 1x. I only measured pixel readback at 1x. Multisample resource support would be a separate change from #1375. |
…support D3D12 doesn't render to the shared-exponent format, but AMD's RDNA4 Vulkan driver (26.11.2) gives E5B9G9R9_UFLOAT_PACK32 COLOR_ATTACHMENT and COLOR_ATTACHMENT_BLEND, and CheckFeatureSupport(FORMAT_SUPPORT) passed them through as RENDER_TARGET, BLENDABLE and the multisample bits. d3d12_r9g9b9e5_uav (ItsNotRexed#1287) failed on an RX 9070 at its RENDER_TARGET == 0 check. The format's render-target, blend, depth-stencil and multisample bits are now cleared whatever the driver advertises. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1040841 to
495910e
Compare
|
Heads-up: #1375 changes the same R9G9B9E5_SHAREDEXP render-target reporting in |
|
Tested 1040841 on NVIDIA GeForce RTX 3090 (Ampere), driver 610.88 (Vulkan 1.4.341), Windows 11 Pro 26300: pass. The PR's diff applied cleanly to
Note that #1375 goes the other way and reports native RGB9E5 render-target support where the device has it. On this NVIDIA GPU there is none, so both give the same answer here. |
|
Tested on Windows 11 with two GPUs on one machine (runtime built from this PR's head, MSVC 14.51), as data for the #1375/#1388 conflict: |
|
@Vonsek, here is the native RDNA4 measurement you asked for, on an RX 9070 XT (
So the RDNA4 native driver behaves like your gfx1036 numbers: it reports and renders RGB9E5 render targets. Support1 is identical, and Support2 differs only by bit 16 ( Leonida, both heads built from source in a separate worktree (MSVC 14.51, Ninja, RelWithDebInfo):
Both branches pass their own tests on this card. On this hardware, though, #1388's layer reports no RENDER_TARGET, while the native D3D12 driver on the same adapter reports it and renders the format correctly. #1375 matches the native answer. Blend and MSAA through the layer weren't measured. Natively the driver reports both, with RT resources at up to 8x. The probe is synthetic (no game data); I can attach its source if useful. AI-assisted (Claude Code); I checked the results. |
|
Tested 495910e on RTX 5070 (Blackwell, subgroup 32..32), NVIDIA 616.56, Windows 11 Pro 26200, MSVC 19.50, Vulkan SDK 1.4.363.0: pass.
Same result on main (c2967a5): this GPU doesn't offer E5B9G9R9 as a render target, so only an RGB9E5-renderable GPU (AMD) can show the change. #1375 touches the same RGB9E5 support answer. |
|
@Vonsek, @zneel: thanks for measuring the native driver. You're right, and my premise here was wrong: AMD's native D3D12 reports and renders R9G9B9E5 render targets. This PR merged after #1375 and its mask overrides it. On AMD |
|
A data point for D3D-158 vs D3D-160 (#1375 / #1388):
So on AI-assisted (Claude Code). |
Claimed in the coordination issue as: #1380 (comment)
What and why
d3d12_r9g9b9e5_uav(added in #1287) fails onmainon an AMD Radeon RX 9070 (RDNA4, AMD 26.11.2) atline 399: (fs.Support1 & D3D12_FORMAT_SUPPORT1_RENDER_TARGET) == 0.VK_FORMAT_E5B9G9R9_UFLOAT_PACK32advertisesCOLOR_ATTACHMENTandCOLOR_ATTACHMENT_BLEND(fromvulkaninfo --show-formats), as well as storage.CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT)inruntime/shims/d3d12_vulkan_device.cppturned those intoRENDER_TARGET,BLENDABLEand the multisample bits.DXGI_FORMAT_R9G9B9E5_SHAREDEXPas a render target, which is exactly what the test pins. So on any GPU whose Vulkan driver can render to E5B9G9R9, the layer answered differently from the PC runtime.For that format, the change clears
RENDER_TARGET,BLENDABLE,DEPTH_STENCIL,MULTISAMPLE_RENDERTARGET,MULTISAMPLE_RESOLVEandMULTISAMPLE_LOADafter the Vulkan-derived bits are assembled. Everything else, including the native or emulated UAV support, is unchanged.Not changed here:
CheckFeatureSupport(MULTISAMPLE_QUALITY_LEVELS)and resource creation withALLOW_RENDER_TARGETfor this format. Both may also need the same rule; I didn't measure them against the host.Tested
Windows 11 Pro 26300, MSVC 14.44, AMD Radeon RX 9070, AMD 26.11.2, on
f85582e2:d3d12_r9g9b9e5_uav_testctestmainline 399: ... RENDER_TARGET) == 0R9G9B9E5 UAV mode: native (Support1=0x020003f0 Support2=0x00000080),OK (0 validation errors)AI-assisted (Claude Code).
Checklist
docs/design.md, with how it was confirmed. (n/a: runtime only)🤖 Generated with Claude Code