vkd3d: Implement ID3D12Device9.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
This commit is contained in:
parent
3b6a4ab988
commit
b03c1fcb5f
|
@ -2540,6 +2540,7 @@ HRESULT STDMETHODCALLTYPE d3d12_device_QueryInterface(d3d12_device_iface *iface,
|
|||
|| IsEqualGUID(riid, &IID_ID3D12Device6)
|
||||
|| IsEqualGUID(riid, &IID_ID3D12Device7)
|
||||
|| IsEqualGUID(riid, &IID_ID3D12Device8)
|
||||
|| IsEqualGUID(riid, &IID_ID3D12Device9)
|
||||
|| IsEqualGUID(riid, &IID_ID3D12Object)
|
||||
|| IsEqualGUID(riid, &IID_IUnknown))
|
||||
{
|
||||
|
@ -4965,7 +4966,35 @@ end:
|
|||
*total_bytes = total;
|
||||
}
|
||||
|
||||
CONST_VTBL struct ID3D12Device8Vtbl d3d12_device_vtbl =
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateShaderCacheSession(d3d12_device_iface *iface,
|
||||
const D3D12_SHADER_CACHE_SESSION_DESC *desc, REFIID iid, void **session)
|
||||
{
|
||||
FIXME("iface %p, desc %p, iid %s, session %p stub!\n",
|
||||
iface, desc, debugstr_guid(iid), session);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_ShaderCacheControl(d3d12_device_iface *iface,
|
||||
D3D12_SHADER_CACHE_KIND_FLAGS kinds, D3D12_SHADER_CACHE_CONTROL_FLAGS control)
|
||||
{
|
||||
FIXME("iface %p, kinds %#x, control %#x stub!\n", iface, kinds, control);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandQueue1(d3d12_device_iface *iface,
|
||||
const D3D12_COMMAND_QUEUE_DESC *desc, REFIID creator_id, REFIID iid, void **command_queue)
|
||||
{
|
||||
TRACE("iface %p, desc %p, creator_id %s, iid %s, command_queue %p.\n",
|
||||
iface, desc, debugstr_guid(creator_id), debugstr_guid(iid), command_queue);
|
||||
|
||||
WARN("Ignoring creator id %s.\n", debugstr_guid(creator_id));
|
||||
|
||||
return d3d12_device_CreateCommandQueue(iface, desc, iid, command_queue);
|
||||
}
|
||||
|
||||
CONST_VTBL struct ID3D12Device9Vtbl d3d12_device_vtbl =
|
||||
{
|
||||
/* IUnknown methods */
|
||||
d3d12_device_QueryInterface,
|
||||
|
@ -5051,6 +5080,10 @@ CONST_VTBL struct ID3D12Device8Vtbl d3d12_device_vtbl =
|
|||
d3d12_device_CreatePlacedResource1,
|
||||
d3d12_device_CreateSamplerFeedbackUnorderedAccessView,
|
||||
d3d12_device_GetCopyableFootprints1,
|
||||
/* ID3D12Device9 methods */
|
||||
d3d12_device_CreateShaderCacheSession,
|
||||
d3d12_device_ShaderCacheControl,
|
||||
d3d12_device_CreateCommandQueue1,
|
||||
};
|
||||
|
||||
#ifdef VKD3D_ENABLE_PROFILING
|
||||
|
|
|
@ -239,7 +239,7 @@ static void STDMETHODCALLTYPE d3d12_device_CreateSamplerFeedbackUnorderedAccessV
|
|||
DEVICE_PROFILED_CALL(CreateSamplerFeedbackUnorderedAccessView, iface, target_resource, feedback_resource, descriptor);
|
||||
}
|
||||
|
||||
CONST_VTBL struct ID3D12Device8Vtbl d3d12_device_vtbl_profiled =
|
||||
CONST_VTBL struct ID3D12Device9Vtbl d3d12_device_vtbl_profiled =
|
||||
{
|
||||
/* IUnknown methods */
|
||||
d3d12_device_QueryInterface,
|
||||
|
@ -325,6 +325,10 @@ CONST_VTBL struct ID3D12Device8Vtbl d3d12_device_vtbl_profiled =
|
|||
d3d12_device_CreatePlacedResource1_profiled,
|
||||
d3d12_device_CreateSamplerFeedbackUnorderedAccessView_profiled,
|
||||
d3d12_device_GetCopyableFootprints1,
|
||||
/* ID3D12Device9 methods */
|
||||
d3d12_device_CreateShaderCacheSession,
|
||||
d3d12_device_ShaderCacheControl,
|
||||
d3d12_device_CreateCommandQueue1,
|
||||
};
|
||||
|
||||
#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 ID3D12Device8* d3d12_swapchain_device_iface(struct d3d12_swapchain* swapchain)
|
||||
static inline struct ID3D12Device9* d3d12_swapchain_device_iface(struct d3d12_swapchain* swapchain)
|
||||
{
|
||||
return &swapchain->command_queue->device->ID3D12Device_iface;
|
||||
}
|
||||
|
@ -1707,7 +1707,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetDevice(dxgi_swapchain_iface
|
|||
|
||||
TRACE("iface %p, iid %s, device %p.\n", iface, debugstr_guid(iid), device);
|
||||
|
||||
return ID3D12Device8_QueryInterface(d3d12_swapchain_device_iface(swapchain), iid, device);
|
||||
return ID3D12Device9_QueryInterface(d3d12_swapchain_device_iface(swapchain), iid, device);
|
||||
}
|
||||
|
||||
/* IDXGISwapChain methods */
|
||||
|
@ -2828,7 +2828,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 = ID3D12Device8_CreateFence(d3d12_swapchain_device_iface(swapchain), DXGI_MAX_SWAP_CHAIN_BUFFERS,
|
||||
if (FAILED(hr = ID3D12Device9_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);
|
||||
|
|
|
@ -2779,7 +2779,7 @@ struct vkd3d_queue_family_info
|
|||
};
|
||||
|
||||
/* ID3D12Device */
|
||||
typedef ID3D12Device8 d3d12_device_iface;
|
||||
typedef ID3D12Device9 d3d12_device_iface;
|
||||
|
||||
struct vkd3d_descriptor_qa_global_info;
|
||||
struct vkd3d_descriptor_qa_heap_buffer_data;
|
||||
|
@ -2865,9 +2865,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 ID3D12Device8Vtbl d3d12_device_vtbl;
|
||||
extern CONST_VTBL struct ID3D12Device9Vtbl d3d12_device_vtbl;
|
||||
#ifdef VKD3D_ENABLE_PROFILING
|
||||
extern CONST_VTBL struct ID3D12Device8Vtbl d3d12_device_vtbl_profiled;
|
||||
extern CONST_VTBL struct ID3D12Device9Vtbl d3d12_device_vtbl_profiled;
|
||||
#endif
|
||||
if (!iface)
|
||||
return NULL;
|
||||
|
@ -2919,23 +2919,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 ID3D12Device8_QueryInterface(&device->ID3D12Device_iface, iid, object);
|
||||
return ID3D12Device9_QueryInterface(&device->ID3D12Device_iface, iid, object);
|
||||
}
|
||||
|
||||
static inline ULONG d3d12_device_add_ref(struct d3d12_device *device)
|
||||
{
|
||||
return ID3D12Device8_AddRef(&device->ID3D12Device_iface);
|
||||
return ID3D12Device9_AddRef(&device->ID3D12Device_iface);
|
||||
}
|
||||
|
||||
static inline ULONG d3d12_device_release(struct d3d12_device *device)
|
||||
{
|
||||
return ID3D12Device8_Release(&device->ID3D12Device_iface);
|
||||
return ID3D12Device9_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 ID3D12Device8_GetDescriptorHandleIncrementSize(&device->ID3D12Device_iface, descriptor_type);
|
||||
return ID3D12Device9_GetDescriptorHandleIncrementSize(&device->ID3D12Device_iface, descriptor_type);
|
||||
}
|
||||
|
||||
static inline bool d3d12_device_use_ssbo_raw_buffer(struct d3d12_device *device)
|
||||
|
|
Loading…
Reference in New Issue