Repository navigation
D3D-86: answer CheckFeatureSupport OPTIONS2-5, 7, 9, 11, 13-16, 18-21 - #775
Conversation
d5e0041 to
7463359
Compare
# Conflicts: # docs/d3d12_vulkan.md
quackottu
left a comment
There was a problem hiding this comment.
Tested 7463359 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: 97% tests passed, 1 tests failed out of 31d3d12_vulkan_device_test(changed here): exit=1 validation=0 | 10 validation errors- 30 test programs in the build pass with 0 validation errors
d3d12_clear_testfails (format 28 case 0 byte 2: Vulkan 7f, WARP 80) exactly as onmain67204bf, so not from this PR: NVIDIA rounds a 0.5 UNORM clear to 0x7f, which #521 addressesd3d12_vulkan_device_testreports 10 synchronization-validation WRITE_AFTER_WRITE hazards on back-to-back copies (so ctest'sd3d12_vulkan_devicefails).main8df277f shows the same 10 here, so not from this PR: it's @guimsolutions's finding in #634, which #782 addresses
Implicit Vulkan layers (overlays) were off through an empty VK_IMPLICIT_LAYER_PATH.
|
Merge hazard with #855, confirmed from the branch itself. A verification run, no code from me.
constexpr VkSampleCountFlags kD3D12SampleCounts =
VK_SAMPLE_COUNT_1_BIT | VK_SAMPLE_COUNT_2_BIT | VK_SAMPLE_COUNT_4_BIT |
VK_SAMPLE_COUNT_8_BIT | VK_SAMPLE_COUNT_16_BIT | VK_SAMPLE_COUNT_32_BIT;
state_.no_output_sample_counts =
static_cast<UINT>(props.limits.framebufferNoAttachmentsSampleCounts & kD3D12SampleCounts);On an RX 7900 XTX that reports So whichever of #775 and #855 lands second needs that mask, or the test goes red again on AMD. A full AMD result for this branch follows in a separate comment. |
|
Full AMD result for this branch, as promised — same hardware/setup as the #854 report. GPU AMD Radeon RX 7900 XTX (RDNA3, gfx1100), AMD proprietary 26.10.1 (LLPC), Vulkan 1.4.359 1. As-is: one red test, the OPTIONS19 mask
i.e. the old mask at 2. With #855's mask applied locally: OPTIONS19 green, but 10 validation errors remainI applied
All ten are synchronization-validation hazards, not VUID errors: (3 images, repeatedly: 3. It is this branch, not the environmentSame shell, same environment, Your RTX 5080 result says 0 validation errors, so something in this branch takes a different path here than on NVIDIA. Two candidates, both guesses: the repeated Worth a look before this lands, since AI-assisted. |
|
Root cause of the ten What firesAll ten are the same shape, in the copy phase, on three images: Nine are Why this branch and not
|
|
Replying to @bobcatchris. @bobcatchris, the ten copy hazards already have a tracker finding and a merged fix: #782 changed Your 69th BC7 case is a useful test of that fix. When #775 is updated, could you rerun it on the RX 7900 XTX with synchronization validation and confirm the BC7 case actually executes? That would distinguish coverage of this branch's extra case from the 68-case main run. AI-assisted. |
|
It shipped without a test, so I opened #891: AI-assisted. |
|
Thanks @AlxcBTW, @bobcatchris, @quackottu and @tylerstraub for the detailed testing and the heads-up! Rebased onto @bobcatchris Ready for a rerun on the RX 7900 XTX whenever you have a minute! |
7463359 to
61bcc96
Compare
Item: D3D-86 (
CheckFeatureSupportforD3D12_FEATURE_D3D12_OPTIONS2-5,7,9,11,13-16,18-21).Leaves sibling PRs untouched:
OPTIONS1(#745),OPTIONS6/10(#469),OPTIONS8(#715),OPTIONS12(#693),FORMAT_INFO(#706), andSHADER_MODEL/ROOT_SIGNATURE(#704).Summary
runtime/shims/d3d12_vulkan_device.cpp:VkPhysicalDeviceLimits::framebufferNoAttachmentsSampleCounts(masked to D3D12's legal sample counts1..32) once inDevice::Device.D3D12_FEATURE_D3D12_OPTIONS2-5,7,9,11,13-16, and18-21inDevice::CheckFeatureSupportwith exact struct-size validation (E_INVALIDARGon mismatch or null) and conservative values matching what the layer actually implements (perdocs/d3d12_vulkan.mdsection 4.1):OPTIONS4.MSAA64KBAlignedTextureSupported = TRUE(handled inGetResourceAllocationInfo).OPTIONS19.SupportedSampleCountsWithNoOutputsfromframebufferNoAttachmentsSampleCounts,AnisoFilterWithPointMipSupportedtied toVulkanDeviceInfo::sampler_anisotropy, and baseline shader-visible heap limits (D3D12_MAX_SHADER_VISIBLE_SAMPLER_HEAP_SIZE = 2048,D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_2 = 1000000).OPTIONS21.ExecuteIndirectTier = D3D12_EXECUTE_INDIRECT_TIER_1_0(baseline enum value; noNOT_SUPPORTEDenumerator exists).DepthBounds,CastingFullyTypedFormat, MSAA UAVs, independent stencil masks, render passes, ray tracing, mesh shaders, sampler feedback, wave MMA, work graphs, GPU upload heaps, etc.) stayFALSE/NOT_SUPPORTED/TIER_0.runtime/test/d3d12_vulkan_device_test.cpp:create_host_device_for_physical(matching the VulkanVkPhysicalDeviceviaVkPhysicalDeviceIDPropertiesLUID / PCI IDs using dynamically loadeddxgi.dll, falling back to the default adapter).compare_feature_options: validatesnullptr, wrong struct sizes (0,sizeof - 1,sizeof + 1), and unknown feature enum refusal (E_INVALIDARG), checks local invariants and thesampler_anisotropytoggle onOPTIONS19.AnisoFilterWithPointMipSupported, and compares all 15 queries conservatively against the host Windows D3D12 runtime on the same adapter (skipping individual queries if an older hostd3d12.dlldoes not know them).docs/d3d12_vulkan.md:OPTIONSqueries and observed RTX 5080 measurements.Verification
Tested on Windows 11, NVIDIA GeForce RTX 5080 (driver 616.56), MSVC 19.44, Windows SDK 10.0.26100.0, Ninja:
python -m compileall -q make_game.py tools tests? pass.powershell -ExecutionPolicy Bypass -File .\scripts\build_runtime.ps1? builds cleanly with 0 warnings.ctest --test-dir runtime/build --output-on-failure? 28/28 passed.d3d12_vulkan_device_test.exeunderLEONIDA_VK_VALIDATION=1(withVK_LOADER_LAYERS_DISABLE=~implicit~to suppress an unrelated broken ReShade implicit layer):CheckFeatureSupport options (NVIDIA GeForce RTX 5080): 15 feature queries compared (0 host-unsupported skipped), MSAA64KB=1, NoOutputsSamples=0x1f, MaxViewHeap=1000000, 0 mismatchesmain(762893f), all 15 feature queries returnE_INVALIDARGfromCheckFeatureSupport.No game files used. AI-assisted.