Repository navigation
d3d12_vulkan_device: answer features 56 and 57 before the CheckFeatureSupport switch (MSVC C4063) - #9771
Open
ThomasSAMP wants to merge 1 commit into
Open
d3d12_vulkan_device: answer features 56 and 57 before the CheckFeatureSupport switch (MSVC C4063)#9771ThomasSAMP wants to merge 1 commit into
ThomasSAMP wants to merge 1 commit into
Conversation
…eSupport switch (MSVC C4063) Some Windows SDK 10.0.26100 headers end the D3D12_FEATURE enum before APPLICATION_SPECIFIC_DRIVER_STATE (56) and BYTECODE_BYPASS_HASH_SUPPORTED (57), which d3d12_feature_compat.h declares by value. Their case labels in the CheckFeatureSupport switch were outside the enum, so every build of gta6rt_d3d12_com warned twice (C4063). Answer the two before the switch, with the same one-BOOL "not supported" payload through write_supported_feature; nothing else changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
checked: #977172751d0 | with: cherry-pick of 72751d0 onto 867d922 (current main 7e39a81 does not build gta6rt_d3d12_com on Windows for an unrelated reason, the #9576 errors already reported in #9677), fresh
AI-assisted. No game files. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claim: #9677 (comment) (new item; no ID assigned yet)
What and why
ID3D12Device::CheckFeatureSupportinruntime/shims/d3d12_vulkan_device.cppanswersAPPLICATION_SPECIFIC_DRIVER_STATE(56) andBYTECODE_BYPASS_HASH_SUPPORTED(57) throughcaselabels oncompat::kFeatureApplicationSpecificDriverStateandcompat::kFeatureBytecodeBypassHashSupported.d3d12_feature_compat.hdeclares those two by value because some Windows SDK 10.0.26100 headers end theD3D12_FEATUREenum before them. On those SDKs the labels fall outside the enum, so every build ofgta6rt_d3d12_comwarns twice:This PR answers the two features before the
switch, with the samewrite_supported_feature<compat::FeatureSupportFlag>(method, data, size, FALSE)they used before. The size check, the payload and the HRESULTs are unchanged, and no other feature is touched. On a header that does declare 56 and 57, theswitchsimply no longer lists them.Tested
Windows 11 Pro 26300, MSVC 14.44 (VS 2022, RelWithDebInfo), Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0, AMD Radeon RX 9070 XT (RDNA4), AMD driver 32.0.32029.2010.
On the current
main(2d53a8055, this branch's base),gta6rt_d3d12_comdoesn't compile on MSVC, with or without this change. There are 5 errors, all from the console descriptor heap merged with #9576:C2665/C2248ind3d12_vulkan_device.cpp(DescriptorHeapconstructor, privateDevice::identity) andrt::d3d12::create_console_descriptor_heapnot found ind3d12_xs_device.cpp:1606. VEgE has offered to fix that. The compiler still reaches the switch, though. On2d53a8055it prints both C4063 warnings without this change and none with it.The runtime results below are from the same change on
main5d74c2723, before that break:gta6rt_d3d12_comandd3d12_vulkan_device_test. Onmainthe build prints the two C4063 warnings above. With this change it prints none, and no new warnings appear. The remaining ones are onmaintoo: C4189 invulkan_present.h:669, which is vulkan_present: mark_surface_lost() drops an unused VkDevice local (C4189 in four targets) #7442, and two C4456 ind3d12_vulkan_device_test.cpp:6982/6989.d3d12_vulkan_device_test(run withVK_LOADER_LAYERS_DISABLE=~implicit~, seedocs/testing.md): stdout is byte-identical tomain's. That includesCheckFeatureSupport options (AMD Radeon RX 9070 XT): 45 feature queries compared (1 host-unsupported skipped), ... 0 mismatches, which compares 56 and 57 with the host runtime (compare_hostat lines 2794/2799,query_oursat 2394-2400). stderr differs only in pointer values.line 6574: tiles == 1with and without this change. That is the Device10CreateReservedResource2path through the Xbox proxy's slot 78, which d3d12_vulkan_device_test: ask the PC device for Device10, since the proxy's slot 78 is the Xbox frame interval #9175, d3d12_vulkan_device_test: reach Device10's CreateReservedResource2 on the inner device #8496 and d3d12_vulkan_device: check PC CreateReservedResource2 behind the Xbox proxy, not through slot 78 #7125 address. It runs after the feature queries.git diff --checkandpython -I scripts/check_no_game_data.py runtime/shims/d3d12_vulkan_device.cpp: clean.No game files used. AI-assisted: yes (Claude Code); I reviewed the change and ran the tests.
docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code