Mesa (main): dzn: Missed ABI fixes for GetCustomHeapProperties

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 15 16:54:58 UTC 2022


Module: Mesa
Branch: main
Commit: b9fb14da069772d1d91fcf8e52b03cbbeebc0ca2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b9fb14da069772d1d91fcf8e52b03cbbeebc0ca2

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Thu Jul 14 09:37:25 2022 -0700

dzn: Missed ABI fixes for GetCustomHeapProperties

Reviewed-by: Bill Kristiansen <billkris at microsoft.com>
Reviewed-by: Sil Vilerino <sivileri at microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17548>

---

 src/microsoft/vulkan/dzn_cmd_buffer.c |  3 +--
 src/microsoft/vulkan/dzn_query.c      | 10 +++++-----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/microsoft/vulkan/dzn_cmd_buffer.c b/src/microsoft/vulkan/dzn_cmd_buffer.c
index cf588368b2d..0a3aa9ac74b 100644
--- a/src/microsoft/vulkan/dzn_cmd_buffer.c
+++ b/src/microsoft/vulkan/dzn_cmd_buffer.c
@@ -1063,8 +1063,7 @@ dzn_cmd_buffer_alloc_internal_buf(struct dzn_cmd_buffer *cmdbuf,
    /* Align size on 64k (the default alignment) */
    size = ALIGN_POT(size, 64 * 1024);
 
-   D3D12_HEAP_PROPERTIES hprops;
-   ID3D12Device1_GetCustomHeapProperties(device->dev, &hprops, 0, heap_type);
+   D3D12_HEAP_PROPERTIES hprops = dzn_ID3D12Device2_GetCustomHeapProperties(device->dev, 0, heap_type);
    D3D12_RESOURCE_DESC rdesc = {
       .Dimension = D3D12_RESOURCE_DIMENSION_BUFFER,
       .Alignment = D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT,
diff --git a/src/microsoft/vulkan/dzn_query.c b/src/microsoft/vulkan/dzn_query.c
index c094cc623de..7bcbc740055 100644
--- a/src/microsoft/vulkan/dzn_query.c
+++ b/src/microsoft/vulkan/dzn_query.c
@@ -22,6 +22,7 @@
  */
 
 #include "dzn_private.h"
+#include "dzn_abi_helper.h"
 
 #include "vk_alloc.h"
 #include "vk_debug_report.h"
@@ -131,9 +132,8 @@ dzn_query_pool_create(struct dzn_device *device,
    default: unreachable("Unsupported query type");
    }
 
-   D3D12_HEAP_PROPERTIES hprops;
-   ID3D12Device1_GetCustomHeapProperties(device->dev, &hprops, 0,
-                                         D3D12_HEAP_TYPE_DEFAULT);
+   D3D12_HEAP_PROPERTIES hprops =
+      dzn_ID3D12Device2_GetCustomHeapProperties(device->dev, 0, D3D12_HEAP_TYPE_DEFAULT);
    D3D12_RESOURCE_DESC rdesc = {
       .Dimension = D3D12_RESOURCE_DIMENSION_BUFFER,
       .Alignment = D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT,
@@ -159,8 +159,8 @@ dzn_query_pool_create(struct dzn_device *device,
       return vk_error(device, VK_ERROR_OUT_OF_DEVICE_MEMORY);
    }
 
-   ID3D12Device1_GetCustomHeapProperties(device->dev, &hprops, 0,
-                                         D3D12_HEAP_TYPE_READBACK);
+   hprops = dzn_ID3D12Device2_GetCustomHeapProperties(device->dev, 0,
+                                                      D3D12_HEAP_TYPE_READBACK);
    rdesc.Width = info->queryCount * (qpool->query_size + sizeof(uint64_t));
    hres = ID3D12Device1_CreateCommittedResource(device->dev, &hprops,
                                                 D3D12_HEAP_FLAG_NONE,



More information about the mesa-commit mailing list