mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Add ID3D12Device4 interface stub.
This commit is contained in:
parent
123e399b89
commit
acd3ed97dc
Notes:
Alexandre Julliard
2023-09-27 23:00:37 +02:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/374
@ -2457,17 +2457,18 @@ static void vkd3d_desc_object_cache_cleanup(struct vkd3d_desc_object_cache *cach
|
||||
}
|
||||
|
||||
/* ID3D12Device */
|
||||
static inline struct d3d12_device *impl_from_ID3D12Device3(ID3D12Device3 *iface)
|
||||
static inline struct d3d12_device *impl_from_ID3D12Device4(ID3D12Device4 *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, struct d3d12_device, ID3D12Device3_iface);
|
||||
return CONTAINING_RECORD(iface, struct d3d12_device, ID3D12Device4_iface);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_QueryInterface(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_QueryInterface(ID3D12Device4 *iface,
|
||||
REFIID riid, void **object)
|
||||
{
|
||||
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
|
||||
|
||||
if (IsEqualGUID(riid, &IID_ID3D12Device3)
|
||||
if (IsEqualGUID(riid, &IID_ID3D12Device4)
|
||||
|| IsEqualGUID(riid, &IID_ID3D12Device3)
|
||||
|| IsEqualGUID(riid, &IID_ID3D12Device2)
|
||||
|| IsEqualGUID(riid, &IID_ID3D12Device1)
|
||||
|| IsEqualGUID(riid, &IID_ID3D12Device)
|
||||
@ -2485,9 +2486,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_QueryInterface(ID3D12Device3 *ifac
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG STDMETHODCALLTYPE d3d12_device_AddRef(ID3D12Device3 *iface)
|
||||
static ULONG STDMETHODCALLTYPE d3d12_device_AddRef(ID3D12Device4 *iface)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
ULONG refcount = InterlockedIncrement(&device->refcount);
|
||||
|
||||
TRACE("%p increasing refcount to %u.\n", device, refcount);
|
||||
@ -2495,9 +2496,9 @@ static ULONG STDMETHODCALLTYPE d3d12_device_AddRef(ID3D12Device3 *iface)
|
||||
return refcount;
|
||||
}
|
||||
|
||||
static ULONG STDMETHODCALLTYPE d3d12_device_Release(ID3D12Device3 *iface)
|
||||
static ULONG STDMETHODCALLTYPE d3d12_device_Release(ID3D12Device4 *iface)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
ULONG refcount = InterlockedDecrement(&device->refcount);
|
||||
|
||||
TRACE("%p decreasing refcount to %u.\n", device, refcount);
|
||||
@ -2531,10 +2532,10 @@ static ULONG STDMETHODCALLTYPE d3d12_device_Release(ID3D12Device3 *iface)
|
||||
return refcount;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_GetPrivateData(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_GetPrivateData(ID3D12Device4 *iface,
|
||||
REFGUID guid, UINT *data_size, void *data)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
|
||||
TRACE("iface %p, guid %s, data_size %p, data %p.\n",
|
||||
iface, debugstr_guid(guid), data_size, data);
|
||||
@ -2542,10 +2543,10 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_GetPrivateData(ID3D12Device3 *ifac
|
||||
return vkd3d_get_private_data(&device->private_store, guid, data_size, data);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_SetPrivateData(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_SetPrivateData(ID3D12Device4 *iface,
|
||||
REFGUID guid, UINT data_size, const void *data)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
|
||||
TRACE("iface %p, guid %s, data_size %u, data %p.\n",
|
||||
iface, debugstr_guid(guid), data_size, data);
|
||||
@ -2553,19 +2554,19 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_SetPrivateData(ID3D12Device3 *ifac
|
||||
return vkd3d_set_private_data(&device->private_store, guid, data_size, data);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_SetPrivateDataInterface(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_SetPrivateDataInterface(ID3D12Device4 *iface,
|
||||
REFGUID guid, const IUnknown *data)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
|
||||
TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
|
||||
|
||||
return vkd3d_set_private_data_interface(&device->private_store, guid, data);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_SetName(ID3D12Device3 *iface, const WCHAR *name)
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_SetName(ID3D12Device4 *iface, const WCHAR *name)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
|
||||
TRACE("iface %p, name %s.\n", iface, debugstr_w(name, device->wchar_size));
|
||||
|
||||
@ -2573,17 +2574,17 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_SetName(ID3D12Device3 *iface, cons
|
||||
VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, name);
|
||||
}
|
||||
|
||||
static UINT STDMETHODCALLTYPE d3d12_device_GetNodeCount(ID3D12Device3 *iface)
|
||||
static UINT STDMETHODCALLTYPE d3d12_device_GetNodeCount(ID3D12Device4 *iface)
|
||||
{
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandQueue(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandQueue(ID3D12Device4 *iface,
|
||||
const D3D12_COMMAND_QUEUE_DESC *desc, REFIID riid, void **command_queue)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_command_queue *object;
|
||||
HRESULT hr;
|
||||
|
||||
@ -2597,10 +2598,10 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandQueue(ID3D12Device3 *
|
||||
riid, command_queue);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandAllocator(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandAllocator(ID3D12Device4 *iface,
|
||||
D3D12_COMMAND_LIST_TYPE type, REFIID riid, void **command_allocator)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_command_allocator *object;
|
||||
HRESULT hr;
|
||||
|
||||
@ -2614,10 +2615,10 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandAllocator(ID3D12Devic
|
||||
riid, command_allocator);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateGraphicsPipelineState(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateGraphicsPipelineState(ID3D12Device4 *iface,
|
||||
const D3D12_GRAPHICS_PIPELINE_STATE_DESC *desc, REFIID riid, void **pipeline_state)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_pipeline_state *object;
|
||||
HRESULT hr;
|
||||
|
||||
@ -2631,10 +2632,10 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateGraphicsPipelineState(ID3D12
|
||||
&IID_ID3D12PipelineState, riid, pipeline_state);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateComputePipelineState(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateComputePipelineState(ID3D12Device4 *iface,
|
||||
const D3D12_COMPUTE_PIPELINE_STATE_DESC *desc, REFIID riid, void **pipeline_state)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_pipeline_state *object;
|
||||
HRESULT hr;
|
||||
|
||||
@ -2648,11 +2649,11 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateComputePipelineState(ID3D12D
|
||||
&IID_ID3D12PipelineState, riid, pipeline_state);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandList(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandList(ID3D12Device4 *iface,
|
||||
UINT node_mask, D3D12_COMMAND_LIST_TYPE type, ID3D12CommandAllocator *command_allocator,
|
||||
ID3D12PipelineState *initial_pipeline_state, REFIID riid, void **command_list)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_command_list *object;
|
||||
HRESULT hr;
|
||||
|
||||
@ -2775,10 +2776,10 @@ bool d3d12_device_is_uma(struct d3d12_device *device, bool *coherent)
|
||||
return true;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device4 *iface,
|
||||
D3D12_FEATURE feature, void *feature_data, UINT feature_data_size)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
|
||||
TRACE("iface %p, feature %#x, feature_data %p, feature_data_size %u.\n",
|
||||
iface, feature, feature_data, feature_data_size);
|
||||
@ -3277,10 +3278,10 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device3
|
||||
}
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateDescriptorHeap(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateDescriptorHeap(ID3D12Device4 *iface,
|
||||
const D3D12_DESCRIPTOR_HEAP_DESC *desc, REFIID riid, void **descriptor_heap)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_descriptor_heap *object;
|
||||
HRESULT hr;
|
||||
|
||||
@ -3294,7 +3295,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateDescriptorHeap(ID3D12Device3
|
||||
&IID_ID3D12DescriptorHeap, riid, descriptor_heap);
|
||||
}
|
||||
|
||||
static UINT STDMETHODCALLTYPE d3d12_device_GetDescriptorHandleIncrementSize(ID3D12Device3 *iface,
|
||||
static UINT STDMETHODCALLTYPE d3d12_device_GetDescriptorHandleIncrementSize(ID3D12Device4 *iface,
|
||||
D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type)
|
||||
{
|
||||
TRACE("iface %p, descriptor_heap_type %#x.\n", iface, descriptor_heap_type);
|
||||
@ -3317,11 +3318,11 @@ static UINT STDMETHODCALLTYPE d3d12_device_GetDescriptorHandleIncrementSize(ID3D
|
||||
}
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateRootSignature(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateRootSignature(ID3D12Device4 *iface,
|
||||
UINT node_mask, const void *bytecode, SIZE_T bytecode_length,
|
||||
REFIID riid, void **root_signature)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_root_signature *object;
|
||||
HRESULT hr;
|
||||
|
||||
@ -3337,10 +3338,10 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateRootSignature(ID3D12Device3
|
||||
&IID_ID3D12RootSignature, riid, root_signature);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d12_device_CreateConstantBufferView(ID3D12Device3 *iface,
|
||||
static void STDMETHODCALLTYPE d3d12_device_CreateConstantBufferView(ID3D12Device4 *iface,
|
||||
const D3D12_CONSTANT_BUFFER_VIEW_DESC *desc, D3D12_CPU_DESCRIPTOR_HANDLE descriptor)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_desc tmp = {0};
|
||||
|
||||
TRACE("iface %p, desc %p, descriptor %#lx.\n", iface, desc, descriptor.ptr);
|
||||
@ -3349,11 +3350,11 @@ static void STDMETHODCALLTYPE d3d12_device_CreateConstantBufferView(ID3D12Device
|
||||
d3d12_desc_write_atomic(d3d12_desc_from_cpu_handle(descriptor), &tmp, device);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d12_device_CreateShaderResourceView(ID3D12Device3 *iface,
|
||||
static void STDMETHODCALLTYPE d3d12_device_CreateShaderResourceView(ID3D12Device4 *iface,
|
||||
ID3D12Resource *resource, const D3D12_SHADER_RESOURCE_VIEW_DESC *desc,
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE descriptor)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_desc tmp = {0};
|
||||
|
||||
TRACE("iface %p, resource %p, desc %p, descriptor %#lx.\n",
|
||||
@ -3363,11 +3364,11 @@ static void STDMETHODCALLTYPE d3d12_device_CreateShaderResourceView(ID3D12Device
|
||||
d3d12_desc_write_atomic(d3d12_desc_from_cpu_handle(descriptor), &tmp, device);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d12_device_CreateUnorderedAccessView(ID3D12Device3 *iface,
|
||||
static void STDMETHODCALLTYPE d3d12_device_CreateUnorderedAccessView(ID3D12Device4 *iface,
|
||||
ID3D12Resource *resource, ID3D12Resource *counter_resource,
|
||||
const D3D12_UNORDERED_ACCESS_VIEW_DESC *desc, D3D12_CPU_DESCRIPTOR_HANDLE descriptor)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_desc tmp = {0};
|
||||
|
||||
TRACE("iface %p, resource %p, counter_resource %p, desc %p, descriptor %#lx.\n",
|
||||
@ -3378,7 +3379,7 @@ static void STDMETHODCALLTYPE d3d12_device_CreateUnorderedAccessView(ID3D12Devic
|
||||
d3d12_desc_write_atomic(d3d12_desc_from_cpu_handle(descriptor), &tmp, device);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d12_device_CreateRenderTargetView(ID3D12Device3 *iface,
|
||||
static void STDMETHODCALLTYPE d3d12_device_CreateRenderTargetView(ID3D12Device4 *iface,
|
||||
ID3D12Resource *resource, const D3D12_RENDER_TARGET_VIEW_DESC *desc,
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE descriptor)
|
||||
{
|
||||
@ -3386,10 +3387,10 @@ static void STDMETHODCALLTYPE d3d12_device_CreateRenderTargetView(ID3D12Device3
|
||||
iface, resource, desc, descriptor.ptr);
|
||||
|
||||
d3d12_rtv_desc_create_rtv(d3d12_rtv_desc_from_cpu_handle(descriptor),
|
||||
impl_from_ID3D12Device3(iface), unsafe_impl_from_ID3D12Resource(resource), desc);
|
||||
impl_from_ID3D12Device4(iface), unsafe_impl_from_ID3D12Resource(resource), desc);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d12_device_CreateDepthStencilView(ID3D12Device3 *iface,
|
||||
static void STDMETHODCALLTYPE d3d12_device_CreateDepthStencilView(ID3D12Device4 *iface,
|
||||
ID3D12Resource *resource, const D3D12_DEPTH_STENCIL_VIEW_DESC *desc,
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE descriptor)
|
||||
{
|
||||
@ -3397,13 +3398,13 @@ static void STDMETHODCALLTYPE d3d12_device_CreateDepthStencilView(ID3D12Device3
|
||||
iface, resource, desc, descriptor.ptr);
|
||||
|
||||
d3d12_dsv_desc_create_dsv(d3d12_dsv_desc_from_cpu_handle(descriptor),
|
||||
impl_from_ID3D12Device3(iface), unsafe_impl_from_ID3D12Resource(resource), desc);
|
||||
impl_from_ID3D12Device4(iface), unsafe_impl_from_ID3D12Resource(resource), desc);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d12_device_CreateSampler(ID3D12Device3 *iface,
|
||||
static void STDMETHODCALLTYPE d3d12_device_CreateSampler(ID3D12Device4 *iface,
|
||||
const D3D12_SAMPLER_DESC *desc, D3D12_CPU_DESCRIPTOR_HANDLE descriptor)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_desc tmp = {0};
|
||||
|
||||
TRACE("iface %p, desc %p, descriptor %#lx.\n", iface, desc, descriptor.ptr);
|
||||
@ -3412,14 +3413,14 @@ static void STDMETHODCALLTYPE d3d12_device_CreateSampler(ID3D12Device3 *iface,
|
||||
d3d12_desc_write_atomic(d3d12_desc_from_cpu_handle(descriptor), &tmp, device);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d12_device_CopyDescriptors(ID3D12Device3 *iface,
|
||||
static void STDMETHODCALLTYPE d3d12_device_CopyDescriptors(ID3D12Device4 *iface,
|
||||
UINT dst_descriptor_range_count, const D3D12_CPU_DESCRIPTOR_HANDLE *dst_descriptor_range_offsets,
|
||||
const UINT *dst_descriptor_range_sizes,
|
||||
UINT src_descriptor_range_count, const D3D12_CPU_DESCRIPTOR_HANDLE *src_descriptor_range_offsets,
|
||||
const UINT *src_descriptor_range_sizes,
|
||||
D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
unsigned int dst_range_idx, dst_idx, src_range_idx, src_idx;
|
||||
unsigned int dst_range_size, src_range_size;
|
||||
struct d3d12_descriptor_heap *dst_heap;
|
||||
@ -3475,7 +3476,7 @@ static void STDMETHODCALLTYPE d3d12_device_CopyDescriptors(ID3D12Device3 *iface,
|
||||
}
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d12_device_CopyDescriptorsSimple(ID3D12Device3 *iface,
|
||||
static void STDMETHODCALLTYPE d3d12_device_CopyDescriptorsSimple(ID3D12Device4 *iface,
|
||||
UINT descriptor_count, const D3D12_CPU_DESCRIPTOR_HANDLE dst_descriptor_range_offset,
|
||||
const D3D12_CPU_DESCRIPTOR_HANDLE src_descriptor_range_offset,
|
||||
D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type)
|
||||
@ -3490,10 +3491,10 @@ static void STDMETHODCALLTYPE d3d12_device_CopyDescriptorsSimple(ID3D12Device3 *
|
||||
}
|
||||
|
||||
static D3D12_RESOURCE_ALLOCATION_INFO * STDMETHODCALLTYPE d3d12_device_GetResourceAllocationInfo(
|
||||
ID3D12Device3 *iface, D3D12_RESOURCE_ALLOCATION_INFO *info, UINT visible_mask,
|
||||
ID3D12Device4 *iface, D3D12_RESOURCE_ALLOCATION_INFO *info, UINT visible_mask,
|
||||
UINT count, const D3D12_RESOURCE_DESC *resource_descs)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
const D3D12_RESOURCE_DESC *desc;
|
||||
uint64_t requested_alignment;
|
||||
|
||||
@ -3566,10 +3567,10 @@ invalid:
|
||||
return info;
|
||||
}
|
||||
|
||||
static D3D12_HEAP_PROPERTIES * STDMETHODCALLTYPE d3d12_device_GetCustomHeapProperties(ID3D12Device3 *iface,
|
||||
static D3D12_HEAP_PROPERTIES * STDMETHODCALLTYPE d3d12_device_GetCustomHeapProperties(ID3D12Device4 *iface,
|
||||
D3D12_HEAP_PROPERTIES *heap_properties, UINT node_mask, D3D12_HEAP_TYPE heap_type)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
bool coherent;
|
||||
|
||||
TRACE("iface %p, heap_properties %p, node_mask 0x%08x, heap_type %#x.\n",
|
||||
@ -3609,12 +3610,12 @@ static D3D12_HEAP_PROPERTIES * STDMETHODCALLTYPE d3d12_device_GetCustomHeapPrope
|
||||
return heap_properties;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommittedResource(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommittedResource(ID3D12Device4 *iface,
|
||||
const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags,
|
||||
const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
|
||||
const D3D12_CLEAR_VALUE *optimized_clear_value, REFIID iid, void **resource)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_resource *object;
|
||||
HRESULT hr;
|
||||
|
||||
@ -3633,10 +3634,10 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommittedResource(ID3D12Devi
|
||||
return return_interface(&object->ID3D12Resource_iface, &IID_ID3D12Resource, iid, resource);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateHeap(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateHeap(ID3D12Device4 *iface,
|
||||
const D3D12_HEAP_DESC *desc, REFIID iid, void **heap)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_heap *object;
|
||||
HRESULT hr;
|
||||
|
||||
@ -3652,12 +3653,12 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateHeap(ID3D12Device3 *iface,
|
||||
return return_interface(&object->ID3D12Heap_iface, &IID_ID3D12Heap, iid, heap);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePlacedResource(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePlacedResource(ID3D12Device4 *iface,
|
||||
ID3D12Heap *heap, UINT64 heap_offset,
|
||||
const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
|
||||
const D3D12_CLEAR_VALUE *optimized_clear_value, REFIID iid, void **resource)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_heap *heap_object;
|
||||
struct d3d12_resource *object;
|
||||
HRESULT hr;
|
||||
@ -3676,11 +3677,11 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePlacedResource(ID3D12Device3
|
||||
return return_interface(&object->ID3D12Resource_iface, &IID_ID3D12Resource, iid, resource);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateReservedResource(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateReservedResource(ID3D12Device4 *iface,
|
||||
const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
|
||||
const D3D12_CLEAR_VALUE *optimized_clear_value, REFIID iid, void **resource)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_resource *object;
|
||||
HRESULT hr;
|
||||
|
||||
@ -3694,11 +3695,11 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateReservedResource(ID3D12Devic
|
||||
return return_interface(&object->ID3D12Resource_iface, &IID_ID3D12Resource, iid, resource);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateSharedHandle(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateSharedHandle(ID3D12Device4 *iface,
|
||||
ID3D12DeviceChild *object, const SECURITY_ATTRIBUTES *attributes, DWORD access,
|
||||
const WCHAR *name, HANDLE *handle)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
|
||||
FIXME("iface %p, object %p, attributes %p, access %#x, name %s, handle %p stub!\n",
|
||||
iface, object, attributes, access, debugstr_w(name, device->wchar_size), handle);
|
||||
@ -3706,7 +3707,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateSharedHandle(ID3D12Device3 *
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_OpenSharedHandle(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_OpenSharedHandle(ID3D12Device4 *iface,
|
||||
HANDLE handle, REFIID riid, void **object)
|
||||
{
|
||||
FIXME("iface %p, handle %p, riid %s, object %p stub!\n",
|
||||
@ -3715,10 +3716,10 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_OpenSharedHandle(ID3D12Device3 *if
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_OpenSharedHandleByName(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_OpenSharedHandleByName(ID3D12Device4 *iface,
|
||||
const WCHAR *name, DWORD access, HANDLE *handle)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
|
||||
FIXME("iface %p, name %s, access %#x, handle %p stub!\n",
|
||||
iface, debugstr_w(name, device->wchar_size), access, handle);
|
||||
@ -3726,7 +3727,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_OpenSharedHandleByName(ID3D12Devic
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_MakeResident(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_MakeResident(ID3D12Device4 *iface,
|
||||
UINT object_count, ID3D12Pageable * const *objects)
|
||||
{
|
||||
FIXME_ONCE("iface %p, object_count %u, objects %p stub!\n",
|
||||
@ -3735,7 +3736,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_MakeResident(ID3D12Device3 *iface,
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_Evict(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_Evict(ID3D12Device4 *iface,
|
||||
UINT object_count, ID3D12Pageable * const *objects)
|
||||
{
|
||||
FIXME_ONCE("iface %p, object_count %u, objects %p stub!\n",
|
||||
@ -3744,10 +3745,10 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_Evict(ID3D12Device3 *iface,
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateFence(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateFence(ID3D12Device4 *iface,
|
||||
UINT64 initial_value, D3D12_FENCE_FLAGS flags, REFIID riid, void **fence)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_fence *object;
|
||||
HRESULT hr;
|
||||
|
||||
@ -3760,21 +3761,21 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateFence(ID3D12Device3 *iface,
|
||||
return return_interface(&object->ID3D12Fence1_iface, &IID_ID3D12Fence1, riid, fence);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_GetDeviceRemovedReason(ID3D12Device3 *iface)
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_GetDeviceRemovedReason(ID3D12Device4 *iface)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return device->removed_reason;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d12_device_GetCopyableFootprints(ID3D12Device3 *iface,
|
||||
static void STDMETHODCALLTYPE d3d12_device_GetCopyableFootprints(ID3D12Device4 *iface,
|
||||
const D3D12_RESOURCE_DESC *desc, UINT first_sub_resource, UINT sub_resource_count,
|
||||
UINT64 base_offset, D3D12_PLACED_SUBRESOURCE_FOOTPRINT *layouts,
|
||||
UINT *row_counts, UINT64 *row_sizes, UINT64 *total_bytes)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
|
||||
unsigned int i, sub_resource_idx, miplevel_idx, row_count, row_size, row_pitch;
|
||||
unsigned int width, height, depth, plane_count, sub_resources_per_plane;
|
||||
@ -3854,10 +3855,10 @@ static void STDMETHODCALLTYPE d3d12_device_GetCopyableFootprints(ID3D12Device3 *
|
||||
*total_bytes = total;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateQueryHeap(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateQueryHeap(ID3D12Device4 *iface,
|
||||
const D3D12_QUERY_HEAP_DESC *desc, REFIID iid, void **heap)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_query_heap *object;
|
||||
HRESULT hr;
|
||||
|
||||
@ -3870,18 +3871,18 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateQueryHeap(ID3D12Device3 *ifa
|
||||
return return_interface(&object->ID3D12QueryHeap_iface, &IID_ID3D12QueryHeap, iid, heap);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_SetStablePowerState(ID3D12Device3 *iface, BOOL enable)
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_SetStablePowerState(ID3D12Device4 *iface, BOOL enable)
|
||||
{
|
||||
FIXME("iface %p, enable %#x stub!\n", iface, enable);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandSignature(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandSignature(ID3D12Device4 *iface,
|
||||
const D3D12_COMMAND_SIGNATURE_DESC *desc, ID3D12RootSignature *root_signature,
|
||||
REFIID iid, void **command_signature)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
struct d3d12_command_signature *object;
|
||||
HRESULT hr;
|
||||
|
||||
@ -3895,14 +3896,14 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandSignature(ID3D12Devic
|
||||
&IID_ID3D12CommandSignature, iid, command_signature);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d12_device_GetResourceTiling(ID3D12Device3 *iface,
|
||||
static void STDMETHODCALLTYPE d3d12_device_GetResourceTiling(ID3D12Device4 *iface,
|
||||
ID3D12Resource *resource, UINT *total_tile_count,
|
||||
D3D12_PACKED_MIP_INFO *packed_mip_info, D3D12_TILE_SHAPE *standard_tile_shape,
|
||||
UINT *sub_resource_tiling_count, UINT first_sub_resource_tiling,
|
||||
D3D12_SUBRESOURCE_TILING *sub_resource_tilings)
|
||||
{
|
||||
const struct d3d12_resource *resource_impl = impl_from_ID3D12Resource(resource);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
|
||||
TRACE("iface %p, resource %p, total_tile_count %p, packed_mip_info %p, "
|
||||
"standard_title_shape %p, sub_resource_tiling_count %p, "
|
||||
@ -3915,9 +3916,9 @@ static void STDMETHODCALLTYPE d3d12_device_GetResourceTiling(ID3D12Device3 *ifac
|
||||
sub_resource_tiling_count, first_sub_resource_tiling, sub_resource_tilings);
|
||||
}
|
||||
|
||||
static LUID * STDMETHODCALLTYPE d3d12_device_GetAdapterLuid(ID3D12Device3 *iface, LUID *luid)
|
||||
static LUID * STDMETHODCALLTYPE d3d12_device_GetAdapterLuid(ID3D12Device4 *iface, LUID *luid)
|
||||
{
|
||||
struct d3d12_device *device = impl_from_ID3D12Device3(iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device4(iface);
|
||||
|
||||
TRACE("iface %p, luid %p.\n", iface, luid);
|
||||
|
||||
@ -3926,7 +3927,7 @@ static LUID * STDMETHODCALLTYPE d3d12_device_GetAdapterLuid(ID3D12Device3 *iface
|
||||
return luid;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePipelineLibrary(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePipelineLibrary(ID3D12Device4 *iface,
|
||||
const void *blob, SIZE_T blob_size, REFIID iid, void **lib)
|
||||
{
|
||||
FIXME("iface %p, blob %p, blob_size %lu, iid %s, lib %p stub!\n", iface, blob, blob_size, debugstr_guid(iid), lib);
|
||||
@ -3934,7 +3935,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePipelineLibrary(ID3D12Device
|
||||
return DXGI_ERROR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_SetEventOnMultipleFenceCompletion(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_SetEventOnMultipleFenceCompletion(ID3D12Device4 *iface,
|
||||
ID3D12Fence *const *fences, const UINT64 *values, UINT fence_count,
|
||||
D3D12_MULTIPLE_FENCE_WAIT_FLAGS flags, HANDLE event)
|
||||
{
|
||||
@ -3944,7 +3945,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_SetEventOnMultipleFenceCompletion(
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_SetResidencyPriority(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_SetResidencyPriority(ID3D12Device4 *iface,
|
||||
UINT object_count, ID3D12Pageable *const *objects, const D3D12_RESIDENCY_PRIORITY *priorities)
|
||||
{
|
||||
FIXME_ONCE("iface %p, object_count %u, objects %p, priorities %p stub!\n", iface, object_count, objects, priorities);
|
||||
@ -3952,7 +3953,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_SetResidencyPriority(ID3D12Device3
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePipelineState(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePipelineState(ID3D12Device4 *iface,
|
||||
const D3D12_PIPELINE_STATE_STREAM_DESC *desc, REFIID iid, void **pipeline_state)
|
||||
{
|
||||
FIXME("iface %p, desc %p, iid %s, pipeline_state %p stub!\n", iface, desc, debugstr_guid(iid), pipeline_state);
|
||||
@ -3960,7 +3961,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePipelineState(ID3D12Device3
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_OpenExistingHeapFromAddress(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_OpenExistingHeapFromAddress(ID3D12Device4 *iface,
|
||||
const void *address, REFIID iid, void **heap)
|
||||
{
|
||||
FIXME("iface %p, address %p, iid %s, heap %p stub!\n", iface, address, debugstr_guid(iid), heap);
|
||||
@ -3968,7 +3969,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_OpenExistingHeapFromAddress(ID3D12
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_OpenExistingHeapFromFileMapping(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_OpenExistingHeapFromFileMapping(ID3D12Device4 *iface,
|
||||
HANDLE file_mapping, REFIID iid, void **heap)
|
||||
{
|
||||
FIXME("iface %p, file_mapping %p, iid %s, heap %p stub!\n", iface, file_mapping, debugstr_guid(iid), heap);
|
||||
@ -3976,7 +3977,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_OpenExistingHeapFromFileMapping(ID
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_EnqueueMakeResident(ID3D12Device3 *iface,
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_EnqueueMakeResident(ID3D12Device4 *iface,
|
||||
D3D12_RESIDENCY_FLAGS flags, UINT num_objects, ID3D12Pageable *const *objects,
|
||||
ID3D12Fence *fence, UINT64 fence_value)
|
||||
{
|
||||
@ -3986,7 +3987,73 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_EnqueueMakeResident(ID3D12Device3
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const struct ID3D12Device3Vtbl d3d12_device_vtbl =
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandList1(ID3D12Device4 *iface,
|
||||
UINT node_mask, D3D12_COMMAND_LIST_TYPE type, D3D12_COMMAND_LIST_FLAGS flags,
|
||||
REFIID iid, void **command_list)
|
||||
{
|
||||
FIXME("iface %p, node_mask 0x%08x, type %#x, flags %#x, iid %s, command_list %p stub!\n",
|
||||
iface, node_mask, type, flags, debugstr_guid(iid), command_list);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateProtectedResourceSession(ID3D12Device4 *iface,
|
||||
const D3D12_PROTECTED_RESOURCE_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_CreateCommittedResource1(ID3D12Device4 *iface,
|
||||
const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags,
|
||||
const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
|
||||
const D3D12_CLEAR_VALUE *optimized_clear_value,
|
||||
ID3D12ProtectedResourceSession *protected_session, REFIID iid, void **resource)
|
||||
{
|
||||
FIXME("iface %p, heap_properties %p, heap_flags %#x, desc %p, initial_state %#x, "
|
||||
"optimized_clear_value %p, protected_session %p, iid %s, resource %p stub!\n",
|
||||
iface, heap_properties, heap_flags, desc, initial_state,
|
||||
optimized_clear_value, protected_session, debugstr_guid(iid), resource);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateHeap1(ID3D12Device4 *iface,
|
||||
const D3D12_HEAP_DESC *desc, ID3D12ProtectedResourceSession *protected_session,
|
||||
REFIID iid, void **heap)
|
||||
{
|
||||
FIXME("iface %p, desc %p, protected_session %p, iid %s, heap %p stub!\n",
|
||||
iface, desc, protected_session, debugstr_guid(iid), heap);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_CreateReservedResource1(ID3D12Device4 *iface,
|
||||
const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
|
||||
const D3D12_CLEAR_VALUE *optimized_clear_value,
|
||||
ID3D12ProtectedResourceSession *protected_session, REFIID iid, void **resource)
|
||||
{
|
||||
FIXME("iface %p, desc %p, initial_state %#x, optimized_clear_value %p, "
|
||||
"protected_session %p, iid %s, resource %p stub!\n",
|
||||
iface, desc, initial_state, optimized_clear_value, protected_session,
|
||||
debugstr_guid(iid), resource);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static D3D12_RESOURCE_ALLOCATION_INFO * STDMETHODCALLTYPE d3d12_device_GetResourceAllocationInfo1(
|
||||
ID3D12Device4 *iface, D3D12_RESOURCE_ALLOCATION_INFO *info, UINT visible_mask,
|
||||
UINT count, const D3D12_RESOURCE_DESC *resource_descs,
|
||||
D3D12_RESOURCE_ALLOCATION_INFO1 *info1)
|
||||
{
|
||||
FIXME("iface %p, info %p, visible_mask 0x%08x, count %u, resource_descs %p, info1 %p stub!\n",
|
||||
iface, info, visible_mask, count, resource_descs, info1);
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
static const struct ID3D12Device4Vtbl d3d12_device_vtbl =
|
||||
{
|
||||
/* IUnknown methods */
|
||||
d3d12_device_QueryInterface,
|
||||
@ -4045,14 +4112,21 @@ static const struct ID3D12Device3Vtbl d3d12_device_vtbl =
|
||||
d3d12_device_OpenExistingHeapFromAddress,
|
||||
d3d12_device_OpenExistingHeapFromFileMapping,
|
||||
d3d12_device_EnqueueMakeResident,
|
||||
/* ID3D12Device4 methods */
|
||||
d3d12_device_CreateCommandList1,
|
||||
d3d12_device_CreateProtectedResourceSession,
|
||||
d3d12_device_CreateCommittedResource1,
|
||||
d3d12_device_CreateHeap1,
|
||||
d3d12_device_CreateReservedResource1,
|
||||
d3d12_device_GetResourceAllocationInfo1,
|
||||
};
|
||||
|
||||
struct d3d12_device *unsafe_impl_from_ID3D12Device3(ID3D12Device3 *iface)
|
||||
struct d3d12_device *unsafe_impl_from_ID3D12Device4(ID3D12Device4 *iface)
|
||||
{
|
||||
if (!iface)
|
||||
return NULL;
|
||||
assert(iface->lpVtbl == &d3d12_device_vtbl);
|
||||
return impl_from_ID3D12Device3(iface);
|
||||
return impl_from_ID3D12Device4(iface);
|
||||
}
|
||||
|
||||
static HRESULT d3d12_device_init(struct d3d12_device *device,
|
||||
@ -4061,7 +4135,7 @@ static HRESULT d3d12_device_init(struct d3d12_device *device,
|
||||
const struct vkd3d_vk_device_procs *vk_procs;
|
||||
HRESULT hr;
|
||||
|
||||
device->ID3D12Device3_iface.lpVtbl = &d3d12_device_vtbl;
|
||||
device->ID3D12Device4_iface.lpVtbl = &d3d12_device_vtbl;
|
||||
device->refcount = 1;
|
||||
|
||||
vkd3d_instance_incref(device->vkd3d_instance = instance);
|
||||
@ -4258,28 +4332,28 @@ HRESULT vkd3d_join_thread(struct vkd3d_instance *instance, union vkd3d_thread_ha
|
||||
|
||||
IUnknown *vkd3d_get_device_parent(ID3D12Device *device)
|
||||
{
|
||||
struct d3d12_device *d3d12_device = impl_from_ID3D12Device3((ID3D12Device3 *)device);
|
||||
struct d3d12_device *d3d12_device = impl_from_ID3D12Device4((ID3D12Device4 *)device);
|
||||
|
||||
return d3d12_device->parent;
|
||||
}
|
||||
|
||||
VkDevice vkd3d_get_vk_device(ID3D12Device *device)
|
||||
{
|
||||
struct d3d12_device *d3d12_device = impl_from_ID3D12Device3((ID3D12Device3 *)device);
|
||||
struct d3d12_device *d3d12_device = impl_from_ID3D12Device4((ID3D12Device4 *)device);
|
||||
|
||||
return d3d12_device->vk_device;
|
||||
}
|
||||
|
||||
VkPhysicalDevice vkd3d_get_vk_physical_device(ID3D12Device *device)
|
||||
{
|
||||
struct d3d12_device *d3d12_device = impl_from_ID3D12Device3((ID3D12Device3 *)device);
|
||||
struct d3d12_device *d3d12_device = impl_from_ID3D12Device4((ID3D12Device4 *)device);
|
||||
|
||||
return d3d12_device->vk_physical_device;
|
||||
}
|
||||
|
||||
struct vkd3d_instance *vkd3d_instance_from_device(ID3D12Device *device)
|
||||
{
|
||||
struct d3d12_device *d3d12_device = impl_from_ID3D12Device3((ID3D12Device3 *)device);
|
||||
struct d3d12_device *d3d12_device = impl_from_ID3D12Device4((ID3D12Device4 *)device);
|
||||
|
||||
return d3d12_device->vkd3d_instance;
|
||||
}
|
||||
|
@ -2220,7 +2220,7 @@ HRESULT d3d12_reserved_resource_create(struct d3d12_device *device,
|
||||
HRESULT vkd3d_create_image_resource(ID3D12Device *device,
|
||||
const struct vkd3d_image_resource_create_info *create_info, ID3D12Resource **resource)
|
||||
{
|
||||
struct d3d12_device *d3d12_device = unsafe_impl_from_ID3D12Device3((ID3D12Device3 *)device);
|
||||
struct d3d12_device *d3d12_device = unsafe_impl_from_ID3D12Device4((ID3D12Device4 *)device);
|
||||
struct d3d12_resource *object;
|
||||
HRESULT hr;
|
||||
|
||||
|
@ -71,11 +71,11 @@ HRESULT vkd3d_create_device(const struct vkd3d_device_create_info *create_info,
|
||||
|
||||
if (!device)
|
||||
{
|
||||
ID3D12Device_Release(&object->ID3D12Device3_iface);
|
||||
ID3D12Device_Release(&object->ID3D12Device4_iface);
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
return return_interface(&object->ID3D12Device3_iface, &IID_ID3D12Device, iid, device);
|
||||
return return_interface(&object->ID3D12Device4_iface, &IID_ID3D12Device, iid, device);
|
||||
}
|
||||
|
||||
/* ID3D12RootSignatureDeserializer */
|
||||
|
@ -1711,7 +1711,7 @@ struct vkd3d_desc_object_cache
|
||||
/* ID3D12Device */
|
||||
struct d3d12_device
|
||||
{
|
||||
ID3D12Device3 ID3D12Device3_iface;
|
||||
ID3D12Device4 ID3D12Device4_iface;
|
||||
LONG refcount;
|
||||
|
||||
VkDevice vk_device;
|
||||
@ -1777,27 +1777,27 @@ struct vkd3d_queue *d3d12_device_get_vkd3d_queue(struct d3d12_device *device, D3
|
||||
bool d3d12_device_is_uma(struct d3d12_device *device, bool *coherent);
|
||||
void d3d12_device_mark_as_removed(struct d3d12_device *device, HRESULT reason,
|
||||
const char *message, ...) VKD3D_PRINTF_FUNC(3, 4);
|
||||
struct d3d12_device *unsafe_impl_from_ID3D12Device3(ID3D12Device3 *iface);
|
||||
struct d3d12_device *unsafe_impl_from_ID3D12Device4(ID3D12Device4 *iface);
|
||||
|
||||
static inline HRESULT d3d12_device_query_interface(struct d3d12_device *device, REFIID iid, void **object)
|
||||
{
|
||||
return ID3D12Device3_QueryInterface(&device->ID3D12Device3_iface, iid, object);
|
||||
return ID3D12Device4_QueryInterface(&device->ID3D12Device4_iface, iid, object);
|
||||
}
|
||||
|
||||
static inline ULONG d3d12_device_add_ref(struct d3d12_device *device)
|
||||
{
|
||||
return ID3D12Device3_AddRef(&device->ID3D12Device3_iface);
|
||||
return ID3D12Device4_AddRef(&device->ID3D12Device4_iface);
|
||||
}
|
||||
|
||||
static inline ULONG d3d12_device_release(struct d3d12_device *device)
|
||||
{
|
||||
return ID3D12Device3_Release(&device->ID3D12Device3_iface);
|
||||
return ID3D12Device4_Release(&device->ID3D12Device4_iface);
|
||||
}
|
||||
|
||||
static inline unsigned int d3d12_device_get_descriptor_handle_increment_size(struct d3d12_device *device,
|
||||
D3D12_DESCRIPTOR_HEAP_TYPE descriptor_type)
|
||||
{
|
||||
return ID3D12Device3_GetDescriptorHandleIncrementSize(&device->ID3D12Device3_iface, descriptor_type);
|
||||
return ID3D12Device4_GetDescriptorHandleIncrementSize(&device->ID3D12Device4_iface, descriptor_type);
|
||||
}
|
||||
|
||||
/* utils */
|
||||
|
Loading…
Reference in New Issue
Block a user