Repository navigation
Conversation
43cc293 to
9f199d0
Compare
9f199d0 to
0d2f9ca
Compare
|
Tested 0d2f9ca on RTX 5070 (Blackwell, subgroup 32..32), NVIDIA 616.56, Windows 11 Pro 26200: pass.
|
RSSetShadingRate now refuses a combiner outside D3D12_SHADING_RATE_COMBINER: Close returns E_INVALIDARG, where the combiner used to act as passthrough. Either VRS call on a compute or copy list makes Close return E_FAIL, and bundles take both. When a list has several invalid calls, the first one decides what Close returns. These are the host PC D3D12 runtime's results, measured on a Radeon 680M, an RTX 3050 and WARP. The stricter checks follow 0xTehuti's ItsNotRexed#519, which also refuses invalid combiners and these calls on compute lists (there with E_INVALIDARG). d3d12_vrs_test checks the Close result after 14 call sequences, plus 2 more at tier 2. They run before the test's PSO check, so they also run on a device that refuses PSOs. The draw case for out-of-range combiners is gone. The docs list where the shading-rate image is still checked at replay rather than at Close. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0d2f9ca to
c6d88c0
Compare
|
Tested 0d2f9ca on an RTX 3060 (driver 610.88), Windows 11: pass. Setup: Windows 11 Pro, NVIDIA GeForce RTX 3060 (Ampere), driver 610.88, Vulkan 1.4.341, MSVC (VS 18 Build Tools), Ninja, RelWithDebInfo. No validation layer installed, so not run with |
|
Tested c6d88c0 on RTX 4090 (driver 621.14), Windows 11 26200, MSVC 19.44: pass
No game files used. AI-assisted run (Claude Code). |
|
Code review at |
RSSetShadingRate now refuses a combiner outside D3D12_SHADING_RATE_COMBINER: Close returns E_INVALIDARG, where the combiner used to act as passthrough. Either VRS call on a compute or copy list makes Close return E_FAIL, and bundles take both. When a list has several invalid calls, the first one decides what Close returns. These are the host PC D3D12 runtime's results, measured on a Radeon 680M, an RTX 3050 and WARP. The stricter checks follow 0xTehuti's ItsNotRexed#519, which also refuses invalid combiners and these calls on compute lists (there with E_INVALIDARG). d3d12_vrs_test checks the Close result after 14 call sequences, plus 2 more at tier 2. They run before the test's PSO check, so they also run on a device that refuses PSOs. The draw case for out-of-range combiners is gone. The docs list where the shading-rate image is still checked at replay rather than at Close. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RSSetShadingRate now refuses a combiner outside D3D12_SHADING_RATE_COMBINER: Close returns E_INVALIDARG, where the combiner used to act as passthrough. Either VRS call on a compute or copy list makes Close return E_FAIL, and bundles take both. When a list has several invalid calls, the first one decides what Close returns. These are the host PC D3D12 runtime's results, measured on a Radeon 680M, an RTX 3050 and WARP. The stricter checks follow 0xTehuti's ItsNotRexed#519, which also refuses invalid combiners and these calls on compute lists (there with E_INVALIDARG). d3d12_vrs_test checks the Close result after 14 call sequences, plus 2 more at tier 2. They run before the test's PSO check, so they also run on a device that refuses PSOs. The draw case for out-of-range combiners is gone. The docs list where the shading-rate image is still checked at replay rather than at Close. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
c6d88c0 to
c163f70
Compare
|
Rebased onto Changes & Conflict Resolutions:
Verification Suite:
Test Environment:
|
|
Closing in favor of #469. @ezwinxdlmao's #469 builds on top of draw paths, hooks the shading-rate attachment into the render pass, and incorporates our combiner validation and command list gating from #519. We tested Closing to keep coordination clean and avoid duplicate PRs on D3D-32. |
Implements D3D-32 from #374 (coordinating with #313).
Summary of Changes
1. CommandList IR (
runtime/src/command_list.h)shading_ratenamespace with standard D3D12 rate constants (rate_1x1throughrate_4x4) and validation helpers (shading_rate::valid).shading_rate_combinernamespace (passthrough,override_val,min,max,sum) with validation helpers (shading_rate_combiner::valid).SetShadingRateandSetShadingRateImagecommand structs to theCommandvariant and methodsrs_set_shading_rate/rs_set_shading_rate_imageonCommandList.2. D3D12 COM Interface (
runtime/shims/d3d12_com.h,runtime/shims/d3d12_com.cpp)RSSetShadingRateandRSSetShadingRateImageonGraphicsCommandList(ID3D12GraphicsCommandList5).DIRECTorBUNDLElists; rejected onCOMPUTEor other list types.nullptr.Reset().command_list_shading_rate()andcommand_list_shading_rate_image().3. Vulkan Device & Backend (
runtime/shims/d3d12_vulkan_device.cpp,runtime/src/vulkan_backend.h,runtime/src/vulkan_replay.h)VK_KHR_fragment_shading_ratedevice extension and physical device features (pipelineFragmentShadingRate,primitiveFragmentShadingRate,attachmentFragmentShadingRate).vkCmdSetFragmentShadingRateKHRdevice function pointer loading.D3D12_FEATURE_D3D12_OPTIONS6support query inCheckFeatureSupport(), reportingVariableShadingRateTier(Tier 1 / Tier 2),ShadingRateImageTileSize,AdditionalShadingRatesSupported, andPerPrimitiveShadingRateSupportedWithViewportIndexing.shading_rate_extenthelper converting D3D12 shading rates toVkExtent2D.vkCmdSetFragmentShadingRateKHR. Validates image resource binding and rejects buffers.4. Testing & Verification
command_list_test.cpp: tests valid/invalid rates, combiners, image resource IDs, and closed-list recording rejection.d3d12_com_test.cpp: testsQueryInterfaceforIID_ID3D12GraphicsCommandList5, default state verification, argument rejection, compute list rejection, and queue replay.d3d12_vulkan_device_test.cpp: testsCheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS6), tier reporting, tile size, background processing, and parameter validation.vk_command_replay_test.cpp: tests replay with and withoutVK_KHR_fragment_shading_rate, 1x1 rate tolerance, extent/combiner verification, and buffer image rejection./W4 /permissive- /utf-8with 0 warnings and 0 errors.docs/d3d12_vulkan.mdwith D3D-32 details.Environment & Disclosure