diff --git a/src/gallium/drivers/d3d12/d3d12_common.h b/src/gallium/drivers/d3d12/d3d12_common.h index 4fa900d1585..867c0a23f74 100644 --- a/src/gallium/drivers/d3d12/d3d12_common.h +++ b/src/gallium/drivers/d3d12/d3d12_common.h @@ -63,6 +63,11 @@ GetGPUDescriptorHandleForHeapStart(ID3D12DescriptorHeap *heap) { return heap->GetGPUDescriptorHandleForHeapStart(); } +D3D12_HEAP_DESC +inline GetDesc(ID3D12Heap* heap) +{ + return heap->GetDesc(); +} inline D3D12_RESOURCE_DESC GetDesc(ID3D12Resource *res) { @@ -98,6 +103,13 @@ GetGPUDescriptorHandleForHeapStart(ID3D12DescriptorHeap *heap) heap->GetGPUDescriptorHandleForHeapStart(&ret); return ret; } +D3D12_HEAP_DESC +inline GetDesc(ID3D12Heap* heap) +{ + D3D12_HEAP_DESC ret; + heap->GetDesc(&ret); + return ret; +} inline D3D12_RESOURCE_DESC GetDesc(ID3D12Resource *res) { diff --git a/src/gallium/drivers/d3d12/d3d12_resource.cpp b/src/gallium/drivers/d3d12/d3d12_resource.cpp index f912a719ad8..693f3b2e160 100644 --- a/src/gallium/drivers/d3d12/d3d12_resource.cpp +++ b/src/gallium/drivers/d3d12/d3d12_resource.cpp @@ -304,7 +304,7 @@ init_texture(struct d3d12_screen *screen, D3D12_FEATURE_DATA_PLACED_RESOURCE_SUPPORT_INFO capData; capData.Dimension = desc.Dimension; capData.Format = desc.Format; - capData.DestHeapProperties = heap->GetDesc().Properties; + capData.DestHeapProperties = GetDesc(heap).Properties; capData.Supported = false; if (FAILED(screen->dev->CheckFeatureSupport(D3D12_FEATURE_PLACED_RESOURCE_SUPPORT_INFO, &capData, sizeof(capData))) || !capData.Supported) { debug_printf("D3D12: d3d12_resource_create_or_place cannot place a resource since D3D12_FEATURE_DATA_PLACED_RESOURCE_SUPPORT_INFO is not supported\n");