Mesa (main): dzn: pass IDXGIAdapter1 to d3d12_create_device

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 19 16:29:45 UTC 2022


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

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Thu Apr  7 14:56:47 2022 +0200

dzn: pass IDXGIAdapter1 to d3d12_create_device

The D3D12 C API doesn't know about the relationship between
IDXGIAdapter1 and IUnknown. And there's no good reason to care about it
here either. So let's just pass the right type all the way.

Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>

---

 src/microsoft/vulkan/dzn_private.h | 2 +-
 src/microsoft/vulkan/dzn_util.cpp  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/microsoft/vulkan/dzn_private.h b/src/microsoft/vulkan/dzn_private.h
index 1c9ad862899..e7e0ee57b0a 100644
--- a/src/microsoft/vulkan/dzn_private.h
+++ b/src/microsoft/vulkan/dzn_private.h
@@ -216,7 +216,7 @@ void
 d3d12_enable_gpu_validation();
 
 ID3D12Device1 *
-d3d12_create_device(IUnknown *adapter, bool experimental_features);
+d3d12_create_device(IDXGIAdapter1 *adapter, bool experimental_features);
 
 struct dzn_queue {
    struct vk_queue vk;
diff --git a/src/microsoft/vulkan/dzn_util.cpp b/src/microsoft/vulkan/dzn_util.cpp
index ce428984f62..9f0924f238d 100644
--- a/src/microsoft/vulkan/dzn_util.cpp
+++ b/src/microsoft/vulkan/dzn_util.cpp
@@ -119,7 +119,7 @@ d3d12_enable_gpu_validation()
 }
 
 ID3D12Device1 *
-d3d12_create_device(IUnknown *adapter, bool experimental_features)
+d3d12_create_device(IDXGIAdapter1 *adapter, bool experimental_features)
 {
    typedef HRESULT(WINAPI *PFN_D3D12CREATEDEVICE)(IUnknown*, D3D_FEATURE_LEVEL, REFIID, void**);
    PFN_D3D12CREATEDEVICE D3D12CreateDevice;



More information about the mesa-commit mailing list