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@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
This commit is contained in:
Erik Faye-Lund 2022-04-07 14:56:47 +02:00 committed by Marge Bot
parent 3ba021cdd0
commit 4753222e62
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -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;