Repository navigation
Conversation
1 of 2 tasks
…fo1/2 (D3D-22) Implements D3D12 resource allocation sizing and alignment rules on the Vulkan device shim per docs/d3d12_vulkan.md §4.1: - GetResourceAllocationInfo on ID3D12Device - GetResourceAllocationInfo1 on ID3D12Device4 - GetResourceAllocationInfo2 on ID3D12Device8 - Handles buffers (64KB alignment), standard textures (64KB alignment), small textures (4KB alignment up to 64KB), MSAA textures (4MB / 64KB alignment), 1D/2D/3D textures, and sequential suballocation placement offsets for multi-resource queries. - Tested and verified against host PC D3D12 runtime with 0 mismatches across buffers, textures, mip chains, small alignment, MSAA, and error cases.
0xTehuti
force-pushed
the
runtime/d3d12-resource-allocation-info
branch
from
November 21, 2026 23:20
49c95c6 to
6f565a3
Compare
Contributor
Author
|
Closed in favor of #327 (D3D-23), which landed on main today covering the same methods. Thanks! |
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.
Summary
Implements
GetResourceAllocationInfo,GetResourceAllocationInfo1, andGetResourceAllocationInfo2on the Vulkan device shim perdocs/d3d12_vulkan.md§4.1 (itemD3D-22in #156).ID3D12Device::GetResourceAllocationInfo.ID3D12Device4::GetResourceAllocationInfo1returning individual resource offsets, alignments, and sizes within an allocation alongside total allocation size.ID3D12Device8::GetResourceAllocationInfo2supportingD3D12_RESOURCE_DESC1.D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT) with subresource 4KB tile alignment, validating that total resource footprint does not exceed 64 KB.D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT) and opt-in 64 KB alignment.DXGI_FORMAT_D24_UNORM_S8_UINT,DXGI_FORMAT_D32_FLOAT_S8X24_UINT) unified surface footprint calculation.~0ullsize with default 64 KB alignment).RetVal) calling conventions.Testing & Verification
AI-assisted. Tested against host PC Microsoft Direct3D 12 runtime (
d3d12.dll) on Windows 11 with:RelWithDebInfo)/std:c++20 /W4 /permissive- /utf-8(0 errors, 0 warnings)Test Results:
d3d12_vulkan_device_test.exe: PASSED with 0 mismatches comparing single buffers, textures, array textures, mip chains, small 4KB alignment, 4MB MSAA textures, multi-resource queries, invalid descs, andID3D12Device8::GetResourceAllocationInfo2against host D3D12 hardware runtime.loader,pe_loader,device_proxy,command_list,descriptor_table,bink_decode,bink_audio,xmem,root_signature,root_signature_oracle,d3d12_gcl8,d3d12_state_map).python -m compileall -q make_game.py tools tests,python -I make_game.py --help, anddotnet build tools/rpf9dump/rpf9dump.csproj -c Releaseall passed with 0 errors.Resolves item
D3D-22in #156.