Repository navigation
d3d12: GetResourceAllocationInfo resource flag and sample quality parity (D3D-467) - #4508
Conversation
Kam471
left a comment
There was a problem hiding this comment.
Built and ran d3d12_vulkan_device_test at b1fffe83 on Windows 11, RTX 5070 Ti: exit 0; the full device suite passes, including the new GetResourceAllocationInfo resource-flag and sample-quality checks. No blocking issue.
Flyander
left a comment
There was a problem hiding this comment.
[P2] Gate the 0x400 buffer flag on tight-alignment support. In current D3D12 headers this is D3D12_RESOURCE_FLAG_USE_TIGHT_ALIGNMENT; Microsoft specifies that it is valid only when D3D12_FEATURE_D3D12_TIGHT_ALIGNMENT reports support, and that unsupported use is invalid (spec). This mask accepts 0x400 unconditionally and returns a normal allocation result without checking the feature tier. On a host that reports NOT_SUPPORTED, Leonida will disagree with the host result (SizeInBytes == UINT64_MAX on GetResourceAllocationInfo error). Please gate the flag by capability or reject it, and add a differential case for an unsupported tier.
|
Tested Negative control. With the parent's 25 more host cases (added locally, not committed). 22 match:
On @Flyander's Three don't match. All three behaved the same before this PR:
So for multisampled textures, the host's rule is "quality must be 0 or one of the two pattern values", not "quality must be 0". The new comment's "Only multisample textures (Count > 1) reject quality != 0" isn't quite right on NVIDIA. That could be a small follow-up, or part of this PR if you'd like to cover it. AI-assisted (Claude Code). |
|
Reading review (no Windows/D3D12 here), plus the enum documentation and a cross-PR merge check.
Cannot run the Windows test. No game data. AI-assisted. |
|
Tested b1fffe8 merged with main 03b09a0 (already up to date) on native Windows 11, MSVC 14.51, full
|
|
On @mrbean56's second-adapter question: a small host probe (plain D3D12
AI-assisted (Claude Code). |
|
Verified statically on the merged tree (main 3faac55): the buffer-flags refusal now enumerates the accept-set so unnamed flags like 0x400 are rejected (explicitly probed in the new test), the multisample-quality rule relaxes only for count>1, and the DENY_SHADER_RESOURCE-without-DS mirror matches the committed-resource validator already at d3d12_vulkan_device.cpp:1462 — a parity gap-closer, not an invention. The C++ test needs Windows and was not run; the accept-sets are host-measured claims that the pending windows/linux-gpu-tools checks carry. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only review). |
Claimed as D3D-467 on #4421.
What and why
Harmonizes GetResourceAllocationInfo resource flag and sample quality checks with host D3D12 and WARP:
Testing
untime/test/d3d12_vulkan_device_test.cpp with 10 differential test cases directly comparing against host D3D12 and WARP.