Repository navigation
Runtime: accept global realtime queues when the base-priority privilege is enabled (D3D-236) - #1819
Callimann8 wants to merge 2 commits into
Conversation
…ge is enabled (D3D-236) CreateCommandQueue refused D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME with DXGI_ERROR_ACCESS_DENIED unconditionally. The PC runtime accepts it when the process token has SeIncreaseBasePriorityPrivilege enabled (measured on an elevated Windows 10 session in ItsNotRexed#1737), so check the token instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YZ2Pr9hXBAWjPeBhWbwSeG
…-236) SE_INC_BASE_PRIORITY_NAME is a TEXT() macro and the runtime builds without UNICODE, so it expanded to a narrow string for LookupPrivilegeValueW (C2664). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YZ2Pr9hXBAWjPeBhWbwSeG
|
Tested 70bdb06 on RTX 4070 SUPER (NVIDIA 616.64) and Intel UHD 770 (101.7092), Windows 11, MSVC 19.44, unelevated: pass
#1817 and #1819 both implement D3D-236, and both pass the same runs here. |
|
Tested 70bdb06 on NVIDIA GeForce RTX 5060 (Blackwell, driver 617.42, Vulkan 1.4.351), Windows 11 Pro build 26300, MSVC (VS 2026), LLVM_MC set, scripts\build_runtime.ps1, then ctest -j 4: pass for this change. d3d12_vulkan_device and vulkan_device_filter pass; 106 of 107 run tests pass. The one failure is d3d12_draw ("fence signal 4 is not above 30"), which fails the same way on main 003e781 here and is fixed by #1807. Run from a normal (non-elevated) user shell, so the privilege-absent path is what ran. This PR adds no test of its own; #1817 covers the same item (D3D-236) and also passes here. (Run with an AI coding agent.) |
Claimed in the coordination issue as: D3D-236 (#1745)
What and why
ID3D12Device::CreateCommandQueuerefusedD3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIMEwithDXGI_ERROR_ACCESS_DENIEDunconditionally. The PC runtime accepts it when the process token hasSeIncreaseBasePriorityPrivilegeenabled (host returned 0x0 on an elevated Windows 10 session, #1737). The shim now reads the process token (TokenPrivileges) and refuses only when that privilege is absent or not enabled, so it agrees with the host either way.The privilege name is spelled as a wide literal because
SE_INC_BASE_PRIORITY_NAMEis aTEXT()macro and the runtime builds withoutUNICODE.Tested
d3d12_vulkan_device_test(ctest -R d3d12_vulkan_device), unelevated: 1/1 passed. The "command queue: global realtime priority" case agrees with the host (both refuse; logCreateCommandQueue refused (global realtime priority), type 0).LEONIDA_VULKAN_HEADERS_FETCH=ON.AI-assisted (Claude Code).
Checklist
docs/design.md, with how it was confirmed. (n/a, no translator change)