anv: Convert DEBUG_SPARSE logging to use mesa_logi
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Use mesa_logi_v(..) in sparse_debug(..).

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38190>
This commit is contained in:
Christian Gmeiner 2025-10-31 19:09:59 +01:00 committed by Marge Bot
parent 4e834b4321
commit b4e7981996
5 changed files with 22 additions and 22 deletions

View file

@ -1399,22 +1399,22 @@ anv_queue_submit_sparse_bind(struct anv_queue *queue,
*/
if (device->physical->sparse_type == ANV_SPARSE_TYPE_NOT_SUPPORTED) {
if (INTEL_DEBUG(DEBUG_SPARSE))
fprintf(stderr, "=== application submitting sparse operations: "
"buffer_bind:%d image_opaque_bind:%d image_bind:%d\n",
submit->buffer_bind_count, submit->image_opaque_bind_count,
submit->image_bind_count);
mesa_logi("=== application submitting sparse operations: "
"buffer_bind:%d image_opaque_bind:%d image_bind:%d\n",
submit->buffer_bind_count, submit->image_opaque_bind_count,
submit->image_bind_count);
return vk_queue_set_lost(&queue->vk, "Sparse binding not supported");
}
assert(submit->command_buffer_count == 0);
if (INTEL_DEBUG(DEBUG_SPARSE)) {
fprintf(stderr, "[sparse submission, buffers:%u opaque_images:%u "
"images:%u waits:%u signals:%u]\n",
submit->buffer_bind_count,
submit->image_opaque_bind_count,
submit->image_bind_count,
submit->wait_count, submit->signal_count);
mesa_logi("[sparse submission, buffers:%u opaque_images:%u "
"images:%u waits:%u signals:%u]\n",
submit->buffer_bind_count,
submit->image_opaque_bind_count,
submit->image_bind_count,
submit->wait_count, submit->signal_count);
}
struct anv_sparse_submission sparse_submit = {

View file

@ -154,8 +154,8 @@ void anv_GetDeviceBufferMemoryRequirements(
pInfo->pCreateInfo->flags & (VK_BUFFER_CREATE_SPARSE_BINDING_BIT |
VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT |
VK_BUFFER_CREATE_SPARSE_ALIASED_BIT))
fprintf(stderr, "=== %s %s:%d flags:0x%08x\n", __func__, __FILE__,
__LINE__, pInfo->pCreateInfo->flags);
mesa_logi("=== %s %s:%d flags:0x%08x\n", __func__, __FILE__,
__LINE__, pInfo->pCreateInfo->flags);
anv_get_buffer_memory_requirements(device,
pInfo->pCreateInfo->flags,
@ -179,8 +179,8 @@ VkResult anv_CreateBuffer(
pCreateInfo->flags & (VK_BUFFER_CREATE_SPARSE_BINDING_BIT |
VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT |
VK_BUFFER_CREATE_SPARSE_ALIASED_BIT))
fprintf(stderr, "=== %s %s:%d flags:0x%08x\n", __func__, __FILE__,
__LINE__, pCreateInfo->flags);
mesa_logi("=== %s %s:%d flags:0x%08x\n", __func__, __FILE__,
__LINE__, pCreateInfo->flags);
if ((pCreateInfo->flags & VK_BUFFER_CREATE_SPARSE_BINDING_BIT) &&
device->physical->sparse_type == ANV_SPARSE_TYPE_TRTT) {

View file

@ -2117,7 +2117,7 @@ void anv_GetPhysicalDeviceSparseImageFormatProperties2(
if (physical_device->sparse_type == ANV_SPARSE_TYPE_NOT_SUPPORTED) {
if (INTEL_DEBUG(DEBUG_SPARSE))
fprintf(stderr, "=== [%s:%d] [%s]\n", __FILE__, __LINE__, __func__);
mesa_logi("=== [%s:%d] [%s]\n", __FILE__, __LINE__, __func__);
return;
}

View file

@ -2287,8 +2287,8 @@ VkResult anv_CreateImage(
pCreateInfo->flags & (VK_IMAGE_CREATE_SPARSE_BINDING_BIT |
VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT |
VK_IMAGE_CREATE_SPARSE_ALIASED_BIT))
fprintf(stderr, "=== %s %s:%d flags:0x%08x\n", __func__, __FILE__,
__LINE__, pCreateInfo->flags);
mesa_logi("=== %s %s:%d flags:0x%08x\n", __func__, __FILE__,
__LINE__, pCreateInfo->flags);
#ifndef VK_USE_PLATFORM_ANDROID_KHR
/* Skip the WSI common swapchain creation here on Android. Similar to ahb,
@ -2718,8 +2718,8 @@ void anv_GetDeviceImageMemoryRequirements(
pInfo->pCreateInfo->flags & (VK_IMAGE_CREATE_SPARSE_BINDING_BIT |
VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT |
VK_IMAGE_CREATE_SPARSE_ALIASED_BIT))
fprintf(stderr, "=== %s %s:%d flags:0x%08x\n", __func__, __FILE__,
__LINE__, pInfo->pCreateInfo->flags);
mesa_logi("=== %s %s:%d flags:0x%08x\n", __func__, __FILE__,
__LINE__, pInfo->pCreateInfo->flags);
ASSERTED VkResult result =
anv_image_init_from_create_info(device, &image, pInfo->pCreateInfo, true);
@ -2826,7 +2826,7 @@ void anv_GetImageSparseMemoryRequirements2(
if (!anv_sparse_residency_is_enabled(device)) {
if ((device->physical->sparse_type == ANV_SPARSE_TYPE_NOT_SUPPORTED) &&
INTEL_DEBUG(DEBUG_SPARSE))
fprintf(stderr, "=== [%s:%d] [%s]\n", __FILE__, __LINE__, __func__);
mesa_logi("=== [%s:%d] [%s]\n", __FILE__, __LINE__, __func__);
*pSparseMemoryRequirementCount = 0;
return;
@ -2849,7 +2849,7 @@ void anv_GetDeviceImageSparseMemoryRequirements(
if (!anv_sparse_residency_is_enabled(device)) {
if ((device->physical->sparse_type == ANV_SPARSE_TYPE_NOT_SUPPORTED) &&
INTEL_DEBUG(DEBUG_SPARSE))
fprintf(stderr, "=== [%s:%d] [%s]\n", __FILE__, __LINE__, __func__);
mesa_logi("=== [%s:%d] [%s]\n", __FILE__, __LINE__, __func__);
*pSparseMemoryRequirementCount = 0;
return;

View file

@ -44,7 +44,7 @@ sparse_debug(const char *format, ...)
va_list args;
va_start(args, format);
vfprintf(stderr, format, args);
mesa_logi_v(format, args);
va_end(args);
}