dzn: Clean up ABI helpers now that we require DirectX-Headers 606
authorJesse Natalie <jenatali@microsoft.com>
Thu, 6 Apr 2023 19:57:15 +0000 (12:57 -0700)
committerMarge Bot <emma+marge@anholt.net>
Fri, 7 Apr 2023 19:11:11 +0000 (19:11 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22346>

src/microsoft/vulkan/dzn_abi_helper.h

index c97085f..13a11b9 100644 (file)
@@ -40,10 +40,8 @@ dzn_ID3D12Device4_GetCustomHeapProperties(ID3D12Device4 *dev, UINT node_mask, D3
     D3D12_HEAP_PROPERTIES ret;
 #ifdef _WIN32
     ID3D12Device4_GetCustomHeapProperties(dev, &ret, node_mask, type);
-#elif D3D12_SDK_VERSION >= 606
-    ret = ID3D12Device4_GetCustomHeapProperties(dev, node_mask, type);
 #else
-    ret = ((D3D12_HEAP_PROPERTIES (STDMETHODCALLTYPE *)(ID3D12Device4 *, UINT, D3D12_HEAP_TYPE))dev->lpVtbl->GetCustomHeapProperties)(dev, node_mask, type);
+    ret = ID3D12Device4_GetCustomHeapProperties(dev, node_mask, type);
 #endif
     return ret;
 }
@@ -54,11 +52,8 @@ dzn_ID3D12Device4_GetResourceAllocationInfo(ID3D12Device4 *dev, UINT visible_mas
     D3D12_RESOURCE_ALLOCATION_INFO ret;
 #ifdef _WIN32
     ID3D12Device4_GetResourceAllocationInfo(dev, &ret, visible_mask, num_resource_descs, resource_descs);
-#elif D3D12_SDK_VERSION >= 606
-    ret = ID3D12Device4_GetResourceAllocationInfo(dev, visible_mask, num_resource_descs, resource_descs);
 #else
-    ret = ((D3D12_RESOURCE_ALLOCATION_INFO (STDMETHODCALLTYPE *)(ID3D12Device4 *, UINT, UINT, const D3D12_RESOURCE_DESC *))
-        dev->lpVtbl->GetResourceAllocationInfo)(dev, visible_mask, num_resource_descs, resource_descs);
+    ret = ID3D12Device4_GetResourceAllocationInfo(dev, visible_mask, num_resource_descs, resource_descs);
 #endif
     return ret;
 }
@@ -69,10 +64,8 @@ dzn_ID3D12Resource_GetDesc(ID3D12Resource *res)
     D3D12_RESOURCE_DESC ret;
 #ifdef _WIN32
     ID3D12Resource_GetDesc(res, &ret);
-#elif D3D12_SDK_VERSION >= 606
-    ret = ID3D12Resource_GetDesc(res);
 #else
-    ret = ((D3D12_RESOURCE_DESC (STDMETHODCALLTYPE *)(ID3D12Resource *))res->lpVtbl->GetDesc)(res);
+    ret = ID3D12Resource_GetDesc(res);
 #endif
     return ret;
 }
@@ -83,10 +76,8 @@ dzn_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(ID3D12DescriptorHeap
     D3D12_CPU_DESCRIPTOR_HANDLE ret;
 #ifdef _WIN32
     ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(heap, &ret);
-#elif D3D12_SDK_VERSION >= 606
-    ret = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(heap);
 #else
-    ret = ((D3D12_CPU_DESCRIPTOR_HANDLE (STDMETHODCALLTYPE *)(ID3D12DescriptorHeap *))heap->lpVtbl->GetCPUDescriptorHandleForHeapStart)(heap);
+    ret = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(heap);
 #endif
     return ret;
 }
@@ -97,10 +88,8 @@ dzn_ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(ID3D12DescriptorHeap
     D3D12_GPU_DESCRIPTOR_HANDLE ret;
 #ifdef _WIN32
     ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(heap, &ret);
-#elif D3D12_SDK_VERSION >= 606
-    ret = ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(heap);
 #else
-    ret = ((D3D12_GPU_DESCRIPTOR_HANDLE (STDMETHODCALLTYPE *)(ID3D12DescriptorHeap *))heap->lpVtbl->GetGPUDescriptorHandleForHeapStart)(heap);
+    ret = ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(heap);
 #endif
     return ret;
 }