vkd3d: Implement ID3D12Device7.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
This commit is contained in:
parent
930e7cb251
commit
d61f562a3e
|
@ -2538,6 +2538,7 @@ HRESULT STDMETHODCALLTYPE d3d12_device_QueryInterface(d3d12_device_iface *iface,
|
|||
|| IsEqualGUID(riid, &IID_ID3D12Device4)
|
||||
|| IsEqualGUID(riid, &IID_ID3D12Device5)
|
||||
|| IsEqualGUID(riid, &IID_ID3D12Device6)
|
||||
|| IsEqualGUID(riid, &IID_ID3D12Device7)
|
||||
|| IsEqualGUID(riid, &IID_ID3D12Object)
|
||||
|| IsEqualGUID(riid, &IID_IUnknown))
|
||||
{
|
||||
|
@ -4830,7 +4831,25 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_SetBackgroundProcessingMode(d3d12_
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
CONST_VTBL struct ID3D12Device6Vtbl d3d12_device_vtbl =
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_AddToStateObject(d3d12_device_iface *iface, const D3D12_STATE_OBJECT_DESC *addition,
|
||||
ID3D12StateObject *state_object, REFIID riid, void **new_state_object)
|
||||
{
|
||||
FIXME("iface %p, addition %p, state_object %p, riid %s, new_state_object %p stub!\n",
|
||||
iface, addition, state_object, debugstr_guid(riid), new_state_object);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateProtectedResourceSession1(d3d12_device_iface *iface,
|
||||
const D3D12_PROTECTED_RESOURCE_SESSION_DESC1 *desc, REFIID riid, void **session)
|
||||
{
|
||||
FIXME("iface %p, desc %p, riid %s, session %p stub!\n",
|
||||
iface, desc, debugstr_guid(riid), session);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
CONST_VTBL struct ID3D12Device7Vtbl d3d12_device_vtbl =
|
||||
{
|
||||
/* IUnknown methods */
|
||||
d3d12_device_QueryInterface,
|
||||
|
@ -4907,6 +4926,9 @@ CONST_VTBL struct ID3D12Device6Vtbl d3d12_device_vtbl =
|
|||
d3d12_device_CheckDriverMatchingIdentifier,
|
||||
/* ID3D12Device6 methods */
|
||||
d3d12_device_SetBackgroundProcessingMode,
|
||||
/* ID3D12Device7 methods */
|
||||
d3d12_device_AddToStateObject,
|
||||
d3d12_device_CreateProtectedResourceSession1,
|
||||
};
|
||||
|
||||
#ifdef VKD3D_ENABLE_PROFILING
|
||||
|
|
|
@ -215,7 +215,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePipelineState_profiled(d3d12
|
|||
DEVICE_PROFILED_CALL_HRESULT(CreatePipelineState, iface, desc, riid, pipeline_state);
|
||||
}
|
||||
|
||||
CONST_VTBL struct ID3D12Device6Vtbl d3d12_device_vtbl_profiled =
|
||||
CONST_VTBL struct ID3D12Device7Vtbl d3d12_device_vtbl_profiled =
|
||||
{
|
||||
/* IUnknown methods */
|
||||
d3d12_device_QueryInterface,
|
||||
|
@ -292,6 +292,9 @@ CONST_VTBL struct ID3D12Device6Vtbl d3d12_device_vtbl_profiled =
|
|||
d3d12_device_CheckDriverMatchingIdentifier,
|
||||
/* ID3D12Device6 methods */
|
||||
d3d12_device_SetBackgroundProcessingMode,
|
||||
/* ID3D12Device7 methods */
|
||||
d3d12_device_AddToStateObject,
|
||||
d3d12_device_CreateProtectedResourceSession1,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -227,7 +227,7 @@ static inline const struct vkd3d_vk_device_procs* d3d12_swapchain_procs(struct d
|
|||
return &swapchain->command_queue->device->vk_procs;
|
||||
}
|
||||
|
||||
static inline struct ID3D12Device6* d3d12_swapchain_device_iface(struct d3d12_swapchain* swapchain)
|
||||
static inline struct ID3D12Device7* d3d12_swapchain_device_iface(struct d3d12_swapchain* swapchain)
|
||||
{
|
||||
return &swapchain->command_queue->device->ID3D12Device_iface;
|
||||
}
|
||||
|
@ -1706,7 +1706,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetDevice(dxgi_swapchain_iface
|
|||
|
||||
TRACE("iface %p, iid %s, device %p.\n", iface, debugstr_guid(iid), device);
|
||||
|
||||
return ID3D12Device6_QueryInterface(d3d12_swapchain_device_iface(swapchain), iid, device);
|
||||
return ID3D12Device7_QueryInterface(d3d12_swapchain_device_iface(swapchain), iid, device);
|
||||
}
|
||||
|
||||
/* IDXGISwapChain methods */
|
||||
|
@ -2827,7 +2827,7 @@ static HRESULT d3d12_swapchain_init(struct d3d12_swapchain *swapchain, IDXGIFact
|
|||
if (swapchain_desc->Flags & DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT)
|
||||
swapchain->frame_latency = 1;
|
||||
|
||||
if (FAILED(hr = ID3D12Device6_CreateFence(d3d12_swapchain_device_iface(swapchain), DXGI_MAX_SWAP_CHAIN_BUFFERS,
|
||||
if (FAILED(hr = ID3D12Device7_CreateFence(d3d12_swapchain_device_iface(swapchain), DXGI_MAX_SWAP_CHAIN_BUFFERS,
|
||||
0, &IID_ID3D12Fence, (void **)&swapchain->frame_latency_fence)))
|
||||
{
|
||||
WARN("Failed to create frame latency fence, hr %#x.\n", hr);
|
||||
|
|
|
@ -2778,7 +2778,7 @@ struct vkd3d_queue_family_info
|
|||
};
|
||||
|
||||
/* ID3D12Device */
|
||||
typedef ID3D12Device6 d3d12_device_iface;
|
||||
typedef ID3D12Device7 d3d12_device_iface;
|
||||
|
||||
struct vkd3d_descriptor_qa_global_info;
|
||||
struct vkd3d_descriptor_qa_heap_buffer_data;
|
||||
|
@ -2864,9 +2864,9 @@ void d3d12_device_mark_as_removed(struct d3d12_device *device, HRESULT reason,
|
|||
|
||||
static inline struct d3d12_device *impl_from_ID3D12Device(d3d12_device_iface *iface)
|
||||
{
|
||||
extern CONST_VTBL struct ID3D12Device6Vtbl d3d12_device_vtbl;
|
||||
extern CONST_VTBL struct ID3D12Device7Vtbl d3d12_device_vtbl;
|
||||
#ifdef VKD3D_ENABLE_PROFILING
|
||||
extern CONST_VTBL struct ID3D12Device6Vtbl d3d12_device_vtbl_profiled;
|
||||
extern CONST_VTBL struct ID3D12Device7Vtbl d3d12_device_vtbl_profiled;
|
||||
#endif
|
||||
if (!iface)
|
||||
return NULL;
|
||||
|
@ -2918,23 +2918,23 @@ static inline const struct vkd3d_memory_info_domain *d3d12_device_get_memory_inf
|
|||
|
||||
static inline HRESULT d3d12_device_query_interface(struct d3d12_device *device, REFIID iid, void **object)
|
||||
{
|
||||
return ID3D12Device6_QueryInterface(&device->ID3D12Device_iface, iid, object);
|
||||
return ID3D12Device7_QueryInterface(&device->ID3D12Device_iface, iid, object);
|
||||
}
|
||||
|
||||
static inline ULONG d3d12_device_add_ref(struct d3d12_device *device)
|
||||
{
|
||||
return ID3D12Device6_AddRef(&device->ID3D12Device_iface);
|
||||
return ID3D12Device7_AddRef(&device->ID3D12Device_iface);
|
||||
}
|
||||
|
||||
static inline ULONG d3d12_device_release(struct d3d12_device *device)
|
||||
{
|
||||
return ID3D12Device6_Release(&device->ID3D12Device_iface);
|
||||
return ID3D12Device7_Release(&device->ID3D12Device_iface);
|
||||
}
|
||||
|
||||
static inline unsigned int d3d12_device_get_descriptor_handle_increment_size(struct d3d12_device *device,
|
||||
D3D12_DESCRIPTOR_HEAP_TYPE descriptor_type)
|
||||
{
|
||||
return ID3D12Device6_GetDescriptorHandleIncrementSize(&device->ID3D12Device_iface, descriptor_type);
|
||||
return ID3D12Device7_GetDescriptorHandleIncrementSize(&device->ID3D12Device_iface, descriptor_type);
|
||||
}
|
||||
|
||||
static inline bool d3d12_device_use_ssbo_raw_buffer(struct d3d12_device *device)
|
||||
|
|
Loading…
Reference in New Issue