vkd3d: Introduce a debug helper for GPU descriptor handles.

This commit is contained in:
Henri Verbeet 2024-01-30 15:12:56 +01:00 committed by Alexandre Julliard
parent 532e902a56
commit 51cdddb961
Notes: Alexandre Julliard 2024-02-06 23:42:55 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/634
3 changed files with 14 additions and 8 deletions

View File

@ -4499,8 +4499,8 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootDescriptorTable(I
{
struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList5(iface);
TRACE("iface %p, root_parameter_index %u, base_descriptor %#"PRIx64".\n",
iface, root_parameter_index, base_descriptor.ptr);
TRACE("iface %p, root_parameter_index %u, base_descriptor %s.\n",
iface, root_parameter_index, debug_gpu_handle(base_descriptor));
d3d12_command_list_set_descriptor_table(list, VKD3D_PIPELINE_BIND_POINT_COMPUTE,
root_parameter_index, base_descriptor);
@ -4511,8 +4511,8 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootDescriptorTable(
{
struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList5(iface);
TRACE("iface %p, root_parameter_index %u, base_descriptor %#"PRIx64".\n",
iface, root_parameter_index, base_descriptor.ptr);
TRACE("iface %p, root_parameter_index %u, base_descriptor %s.\n",
iface, root_parameter_index, debug_gpu_handle(base_descriptor));
d3d12_command_list_set_descriptor_table(list, VKD3D_PIPELINE_BIND_POINT_GRAPHICS,
root_parameter_index, base_descriptor);
@ -5432,8 +5432,8 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID
struct d3d12_resource *resource_impl;
VkClearColorValue colour;
TRACE("iface %p, gpu_handle %#"PRIx64", cpu_handle %s, resource %p, values %p, rect_count %u, rects %p.\n",
iface, gpu_handle.ptr, debug_cpu_handle(cpu_handle), resource, values, rect_count, rects);
TRACE("iface %p, gpu_handle %s, cpu_handle %s, resource %p, values %p, rect_count %u, rects %p.\n",
iface, debug_gpu_handle(gpu_handle), debug_cpu_handle(cpu_handle), resource, values, rect_count, rects);
resource_impl = unsafe_impl_from_ID3D12Resource(resource);
if (!(descriptor = d3d12_desc_from_cpu_handle(cpu_handle)->s.u.view))
@ -5496,8 +5496,8 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewFloat(I
VkClearColorValue colour;
struct vkd3d_view *view;
TRACE("iface %p, gpu_handle %#"PRIx64", cpu_handle %s, resource %p, values %p, rect_count %u, rects %p.\n",
iface, gpu_handle.ptr, debug_cpu_handle(cpu_handle), resource, values, rect_count, rects);
TRACE("iface %p, gpu_handle %s, cpu_handle %s, resource %p, values %p, rect_count %u, rects %p.\n",
iface, debug_gpu_handle(gpu_handle), debug_cpu_handle(cpu_handle), resource, values, rect_count, rects);
resource_impl = unsafe_impl_from_ID3D12Resource(resource);
if (!(view = d3d12_desc_from_cpu_handle(cpu_handle)->s.u.view))

View File

@ -678,6 +678,11 @@ const char *debug_d3d12_shader_component_mapping(unsigned int mapping)
debug_d3d12_shader_component(D3D12_DECODE_SHADER_4_COMPONENT_MAPPING(3, mapping)));
}
const char *debug_gpu_handle(D3D12_GPU_DESCRIPTOR_HANDLE handle)
{
return vkd3d_dbg_sprintf("{%#"PRIx64"}", handle.ptr);
}
const char *debug_vk_extent_3d(VkExtent3D extent)
{
return vkd3d_dbg_sprintf("(%u, %u, %u)",

View File

@ -1963,6 +1963,7 @@ HRESULT return_interface(void *iface, REFIID iface_iid, REFIID requested_iid, vo
const char *debug_cpu_handle(D3D12_CPU_DESCRIPTOR_HANDLE handle);
const char *debug_d3d12_box(const D3D12_BOX *box);
const char *debug_d3d12_shader_component_mapping(unsigned int mapping);
const char *debug_gpu_handle(D3D12_GPU_DESCRIPTOR_HANDLE handle);
const char *debug_vk_extent_3d(VkExtent3D extent);
const char *debug_vk_memory_heap_flags(VkMemoryHeapFlags flags);
const char *debug_vk_memory_property_flags(VkMemoryPropertyFlags flags);