mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 19:00:13 +01:00
dzn: Try to get a ID3D12Device10 object
Will be needed to support format casting. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17339>
This commit is contained in:
parent
457e9deee1
commit
bda14ae998
2 changed files with 15 additions and 0 deletions
|
|
@ -144,6 +144,9 @@ dzn_physical_device_destroy(struct dzn_physical_device *pdev)
|
|||
if (pdev->dev)
|
||||
ID3D12Device1_Release(pdev->dev);
|
||||
|
||||
if (pdev->dev10)
|
||||
ID3D12Device1_Release(pdev->dev10);
|
||||
|
||||
if (pdev->adapter)
|
||||
IUnknown_Release(pdev->adapter);
|
||||
|
||||
|
|
@ -692,6 +695,8 @@ dzn_physical_device_get_d3d12_dev(struct dzn_physical_device *pdev)
|
|||
instance->factory,
|
||||
!instance->dxil_validator);
|
||||
|
||||
if (FAILED(ID3D12Device1_QueryInterface(pdev->dev, &IID_ID3D12Device10, (void **)&pdev->dev10)))
|
||||
pdev->dev10 = NULL;
|
||||
dzn_physical_device_cache_caps(pdev);
|
||||
dzn_physical_device_init_memory(pdev);
|
||||
dzn_physical_device_init_uuids(pdev);
|
||||
|
|
@ -2110,6 +2115,9 @@ dzn_device_destroy(struct dzn_device *device, const VkAllocationCallbacks *pAllo
|
|||
if (device->dev)
|
||||
ID3D12Device1_Release(device->dev);
|
||||
|
||||
if (device->dev10)
|
||||
ID3D12Device1_Release(device->dev10);
|
||||
|
||||
vk_device_finish(&device->vk);
|
||||
vk_free2(&instance->vk.alloc, pAllocator, device);
|
||||
}
|
||||
|
|
@ -2189,6 +2197,11 @@ dzn_device_create(struct dzn_physical_device *pdev,
|
|||
|
||||
ID3D12Device1_AddRef(device->dev);
|
||||
|
||||
if (pdev->dev10) {
|
||||
device->dev10 = pdev->dev10;
|
||||
ID3D12Device1_AddRef(device->dev10);
|
||||
}
|
||||
|
||||
ID3D12InfoQueue *info_queue;
|
||||
if (SUCCEEDED(ID3D12Device1_QueryInterface(device->dev,
|
||||
&IID_ID3D12InfoQueue,
|
||||
|
|
|
|||
|
|
@ -201,6 +201,7 @@ struct dzn_physical_device {
|
|||
|
||||
mtx_t dev_lock;
|
||||
ID3D12Device2 *dev;
|
||||
ID3D12Device10 *dev10;
|
||||
D3D_FEATURE_LEVEL feature_level;
|
||||
D3D_SHADER_MODEL shader_model;
|
||||
D3D12_FEATURE_DATA_ARCHITECTURE1 architecture;
|
||||
|
|
@ -254,6 +255,7 @@ struct dzn_device {
|
|||
struct vk_device_dispatch_table cmd_dispatch;
|
||||
|
||||
ID3D12Device2 *dev;
|
||||
ID3D12Device10 *dev10;
|
||||
ID3D12DeviceConfiguration *dev_config;
|
||||
|
||||
struct dzn_meta_indirect_draw indirect_draws[DZN_NUM_INDIRECT_DRAW_TYPES];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue