vkd3d: Move ID3D12QueryHeap impl_froms to header
Basic casts should not be function calls. Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
parent
2334c136e3
commit
875fbe5f50
|
@ -8297,7 +8297,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_BeginQuery(d3d12_command_list_i
|
||||||
ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT index)
|
ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT index)
|
||||||
{
|
{
|
||||||
struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList(iface);
|
struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList(iface);
|
||||||
struct d3d12_query_heap *query_heap = unsafe_impl_from_ID3D12QueryHeap(heap);
|
struct d3d12_query_heap *query_heap = impl_from_ID3D12QueryHeap(heap);
|
||||||
const struct vkd3d_vk_device_procs *vk_procs = &list->device->vk_procs;
|
const struct vkd3d_vk_device_procs *vk_procs = &list->device->vk_procs;
|
||||||
VkQueryControlFlags flags = d3d12_query_type_get_vk_flags(type);
|
VkQueryControlFlags flags = d3d12_query_type_get_vk_flags(type);
|
||||||
|
|
||||||
|
@ -8338,7 +8338,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_EndQuery(d3d12_command_list_ifa
|
||||||
ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT index)
|
ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT index)
|
||||||
{
|
{
|
||||||
struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList(iface);
|
struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList(iface);
|
||||||
struct d3d12_query_heap *query_heap = unsafe_impl_from_ID3D12QueryHeap(heap);
|
struct d3d12_query_heap *query_heap = impl_from_ID3D12QueryHeap(heap);
|
||||||
const struct vkd3d_vk_device_procs *vk_procs = &list->device->vk_procs;
|
const struct vkd3d_vk_device_procs *vk_procs = &list->device->vk_procs;
|
||||||
|
|
||||||
TRACE("iface %p, heap %p, type %#x, index %u.\n", iface, heap, type, index);
|
TRACE("iface %p, heap %p, type %#x, index %u.\n", iface, heap, type, index);
|
||||||
|
@ -8462,7 +8462,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResolveQueryData(d3d12_command_
|
||||||
ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT start_index, UINT query_count,
|
ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT start_index, UINT query_count,
|
||||||
ID3D12Resource *dst_buffer, UINT64 aligned_dst_buffer_offset)
|
ID3D12Resource *dst_buffer, UINT64 aligned_dst_buffer_offset)
|
||||||
{
|
{
|
||||||
struct d3d12_query_heap *query_heap = unsafe_impl_from_ID3D12QueryHeap(heap);
|
struct d3d12_query_heap *query_heap = impl_from_ID3D12QueryHeap(heap);
|
||||||
struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList(iface);
|
struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList(iface);
|
||||||
struct d3d12_resource *buffer = impl_from_ID3D12Resource(dst_buffer);
|
struct d3d12_resource *buffer = impl_from_ID3D12Resource(dst_buffer);
|
||||||
const struct vkd3d_vk_device_procs *vk_procs = &list->device->vk_procs;
|
const struct vkd3d_vk_device_procs *vk_procs = &list->device->vk_procs;
|
||||||
|
|
|
@ -5597,11 +5597,6 @@ static void d3d12_query_heap_set_name(struct d3d12_query_heap *heap, const char
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ID3D12QueryHeap */
|
/* ID3D12QueryHeap */
|
||||||
static inline struct d3d12_query_heap *impl_from_ID3D12QueryHeap(ID3D12QueryHeap *iface)
|
|
||||||
{
|
|
||||||
return CONTAINING_RECORD(iface, struct d3d12_query_heap, ID3D12QueryHeap_iface);
|
|
||||||
}
|
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE d3d12_query_heap_QueryInterface(ID3D12QueryHeap *iface,
|
static HRESULT STDMETHODCALLTYPE d3d12_query_heap_QueryInterface(ID3D12QueryHeap *iface,
|
||||||
REFIID iid, void **out)
|
REFIID iid, void **out)
|
||||||
{
|
{
|
||||||
|
@ -5701,7 +5696,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_query_heap_GetDevice(ID3D12QueryHeap *ifa
|
||||||
return d3d12_device_query_interface(heap->device, iid, device);
|
return d3d12_device_query_interface(heap->device, iid, device);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CONST_VTBL struct ID3D12QueryHeapVtbl d3d12_query_heap_vtbl =
|
CONST_VTBL struct ID3D12QueryHeapVtbl d3d12_query_heap_vtbl =
|
||||||
{
|
{
|
||||||
/* IUnknown methods */
|
/* IUnknown methods */
|
||||||
d3d12_query_heap_QueryInterface,
|
d3d12_query_heap_QueryInterface,
|
||||||
|
@ -5716,14 +5711,6 @@ static CONST_VTBL struct ID3D12QueryHeapVtbl d3d12_query_heap_vtbl =
|
||||||
d3d12_query_heap_GetDevice,
|
d3d12_query_heap_GetDevice,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct d3d12_query_heap *unsafe_impl_from_ID3D12QueryHeap(ID3D12QueryHeap *iface)
|
|
||||||
{
|
|
||||||
if (!iface)
|
|
||||||
return NULL;
|
|
||||||
assert(iface->lpVtbl == &d3d12_query_heap_vtbl);
|
|
||||||
return impl_from_ID3D12QueryHeap(iface);
|
|
||||||
}
|
|
||||||
|
|
||||||
HRESULT d3d12_query_heap_create(struct d3d12_device *device, const D3D12_QUERY_HEAP_DESC *desc,
|
HRESULT d3d12_query_heap_create(struct d3d12_device *device, const D3D12_QUERY_HEAP_DESC *desc,
|
||||||
struct d3d12_query_heap **heap)
|
struct d3d12_query_heap **heap)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1223,7 +1223,15 @@ struct d3d12_query_heap
|
||||||
|
|
||||||
HRESULT d3d12_query_heap_create(struct d3d12_device *device, const D3D12_QUERY_HEAP_DESC *desc,
|
HRESULT d3d12_query_heap_create(struct d3d12_device *device, const D3D12_QUERY_HEAP_DESC *desc,
|
||||||
struct d3d12_query_heap **heap);
|
struct d3d12_query_heap **heap);
|
||||||
struct d3d12_query_heap *unsafe_impl_from_ID3D12QueryHeap(ID3D12QueryHeap *iface);
|
|
||||||
|
static inline struct d3d12_query_heap *impl_from_ID3D12QueryHeap(ID3D12QueryHeap *iface)
|
||||||
|
{
|
||||||
|
extern CONST_VTBL struct ID3D12QueryHeapVtbl d3d12_query_heap_vtbl;
|
||||||
|
if (!iface)
|
||||||
|
return NULL;
|
||||||
|
assert(iface->lpVtbl == &d3d12_query_heap_vtbl);
|
||||||
|
return CONTAINING_RECORD(iface, struct d3d12_query_heap, ID3D12QueryHeap_iface);
|
||||||
|
}
|
||||||
|
|
||||||
static inline size_t d3d12_query_heap_type_get_data_size(D3D12_QUERY_HEAP_TYPE heap_type)
|
static inline size_t d3d12_query_heap_type_get_data_size(D3D12_QUERY_HEAP_TYPE heap_type)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue