mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:00:52 +01:00
[PR #49] d3d12_vulkan_device: answer features 56 and 57 before the CheckFeatureSupport switch (MSVC C4063) #101
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#101
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/49
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9771📝 Commits (1)
72751d0d3d12_vulkan_device: answer features 56 and 57 before the CheckFeatureSupport switch (MSVC C4063)📊 Changes
1 file changed (+6 additions, -4 deletions)
View changed files
📝
runtime/shims/d3d12_vulkan_device.cpp(+6 -4)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Claim: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7115476617 (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#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#9175,#8496and#7125address. 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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.