vkd3d: Add some more debug output to memory allocation functions.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
This commit is contained in:
parent
5e54c1fc5d
commit
6e1867b001
|
@ -262,6 +262,8 @@ static void vkd3d_memory_allocation_free(const struct vkd3d_memory_allocation *a
|
||||||
{
|
{
|
||||||
const struct vkd3d_vk_device_procs *vk_procs = &device->vk_procs;
|
const struct vkd3d_vk_device_procs *vk_procs = &device->vk_procs;
|
||||||
|
|
||||||
|
TRACE("allocation %p, device %p, allocator %p.\n", allocation, device, allocator);
|
||||||
|
|
||||||
#ifdef VKD3D_ENABLE_DESCRIPTOR_QA
|
#ifdef VKD3D_ENABLE_DESCRIPTOR_QA
|
||||||
vkd3d_descriptor_debug_unregister_cookie(allocation->resource.cookie);
|
vkd3d_descriptor_debug_unregister_cookie(allocation->resource.cookie);
|
||||||
#endif
|
#endif
|
||||||
|
@ -291,6 +293,8 @@ static HRESULT vkd3d_memory_allocation_init(struct vkd3d_memory_allocation *allo
|
||||||
VkResult vr;
|
VkResult vr;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("allocation %p, device %p, allocator %p, info %p.\n", allocation, device, allocator, info);
|
||||||
|
|
||||||
memset(allocation, 0, sizeof(*allocation));
|
memset(allocation, 0, sizeof(*allocation));
|
||||||
allocation->heap_type = info->heap_properties.Type;
|
allocation->heap_type = info->heap_properties.Type;
|
||||||
allocation->heap_flags = info->heap_flags;
|
allocation->heap_flags = info->heap_flags;
|
||||||
|
@ -402,6 +406,9 @@ static HRESULT vkd3d_memory_allocation_init(struct vkd3d_memory_allocation *allo
|
||||||
#ifdef VKD3D_ENABLE_DESCRIPTOR_QA
|
#ifdef VKD3D_ENABLE_DESCRIPTOR_QA
|
||||||
vkd3d_descriptor_debug_register_allocation_cookie(allocation->resource.cookie, info);
|
vkd3d_descriptor_debug_register_allocation_cookie(allocation->resource.cookie, info);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
TRACE("Created allocation %p on memory type %u (%"PRIu64" bytes).\n",
|
||||||
|
allocation, allocation->vk_memory_type, allocation->resource.size);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -584,6 +591,8 @@ static HRESULT vkd3d_memory_chunk_create(struct d3d12_device *device, struct vkd
|
||||||
struct vkd3d_memory_chunk *object;
|
struct vkd3d_memory_chunk *object;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("device %p, allocator %p, info %p, chunk %p.\n", device, allocator, info, chunk);
|
||||||
|
|
||||||
if (!(object = vkd3d_malloc(sizeof(*object))))
|
if (!(object = vkd3d_malloc(sizeof(*object))))
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
@ -598,11 +607,15 @@ static HRESULT vkd3d_memory_chunk_create(struct d3d12_device *device, struct vkd
|
||||||
object->allocation.chunk = object;
|
object->allocation.chunk = object;
|
||||||
vkd3d_memory_chunk_insert_range(object, 0, 0, object->allocation.resource.size);
|
vkd3d_memory_chunk_insert_range(object, 0, 0, object->allocation.resource.size);
|
||||||
*chunk = object;
|
*chunk = object;
|
||||||
|
|
||||||
|
TRACE("Created chunk %p (allocation %p).\n", object, &object->allocation);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vkd3d_memory_chunk_destroy(struct vkd3d_memory_chunk *chunk, struct d3d12_device *device, struct vkd3d_memory_allocator *allocator)
|
static void vkd3d_memory_chunk_destroy(struct vkd3d_memory_chunk *chunk, struct d3d12_device *device, struct vkd3d_memory_allocator *allocator)
|
||||||
{
|
{
|
||||||
|
TRACE("chunk %p, device %p, allocator %p.\n", chunk, device, allocator);
|
||||||
|
|
||||||
vkd3d_memory_allocation_free(&chunk->allocation, device, allocator);
|
vkd3d_memory_allocation_free(&chunk->allocation, device, allocator);
|
||||||
vkd3d_free(chunk->free_ranges);
|
vkd3d_free(chunk->free_ranges);
|
||||||
vkd3d_free(chunk);
|
vkd3d_free(chunk);
|
||||||
|
|
Loading…
Reference in New Issue