mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
d3d12: Add GetDesc wrapper for ID3D12Heap
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10779
Fixes: 55e377e965 ("d3d12: Add partial media, compute, graphics support with CORE and GENERIC feature levels")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28074>
This commit is contained in:
parent
089cb522be
commit
1b6d7ab80b
2 changed files with 13 additions and 1 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue