diff --git a/src/gallium/drivers/zink/zink_blit.c b/src/gallium/drivers/zink/zink_blit.c index 1ccf24a8c9c..cd902c94f58 100644 --- a/src/gallium/drivers/zink/zink_blit.c +++ b/src/gallium/drivers/zink/zink_blit.c @@ -71,7 +71,7 @@ blit_resolve(struct zink_context *ctx, const struct pipe_blit_info *info, bool * zink_batch_reference_resource_rw(batch, src, false); zink_batch_reference_resource_rw(batch, dst, true); - bool marker = zink_cmd_debug_marker_begin(ctx, "blit_resolve(%s->%s, %dx%d->%dx%d)", + bool marker = zink_cmd_debug_marker_begin(ctx, cmdbuf, "blit_resolve(%s->%s, %dx%d->%dx%d)", util_format_short_name(info->src.format), util_format_short_name(info->src.format), info->src.box.width, info->src.box.height, @@ -181,7 +181,7 @@ blit_native(struct zink_context *ctx, const struct pipe_blit_info *info, bool *n zink_batch_reference_resource_rw(batch, src, false); zink_batch_reference_resource_rw(batch, dst, true); - bool marker = zink_cmd_debug_marker_begin(ctx, "blit_native(%s->%s, %dx%d->%dx%d)", + bool marker = zink_cmd_debug_marker_begin(ctx, cmdbuf, "blit_native(%s->%s, %dx%d->%dx%d)", util_format_short_name(info->src.format), util_format_short_name(info->src.format), info->src.box.width, info->src.box.height, @@ -330,7 +330,7 @@ zink_blit(struct pipe_context *pctx, bool stencil_blit = false; if (!util_blitter_is_blit_supported(ctx->blitter, info)) { if (util_format_is_depth_or_stencil(info->src.resource->format)) { - bool marker = zink_cmd_debug_marker_begin(ctx, "zink_blit(Z %s->%s, %dx%d->%dx%d)", + bool marker = zink_cmd_debug_marker_begin(ctx, VK_NULL_HANDLE, "zink_blit(Z %s->%s, %dx%d->%dx%d)", util_format_short_name(info->src.format), util_format_short_name(info->dst.format), info->src.box.width, info->src.box.height, @@ -370,7 +370,7 @@ zink_blit(struct pipe_context *pctx, zink_blit_begin(ctx, ZINK_BLIT_SAVE_FB | ZINK_BLIT_SAVE_FS | ZINK_BLIT_SAVE_TEXTURES); if (stencil_blit) { - bool marker = zink_cmd_debug_marker_begin(ctx, "zink_blit(S fallback %s->%s, %dx%d->%dx%d)", + bool marker = zink_cmd_debug_marker_begin(ctx, VK_NULL_HANDLE, "zink_blit(S fallback %s->%s, %dx%d->%dx%d)", util_format_short_name(info->src.format), util_format_short_name(info->dst.format), info->src.box.width, info->src.box.height, @@ -396,7 +396,7 @@ zink_blit(struct pipe_context *pctx, zink_cmd_debug_marker_end(ctx, marker); } else { - bool marker = zink_cmd_debug_marker_begin(ctx, "zink_blit(%s->%s, %dx%d->%dx%d)", + bool marker = zink_cmd_debug_marker_begin(ctx, VK_NULL_HANDLE, "zink_blit(%s->%s, %dx%d->%dx%d)", util_format_short_name(info->src.format), util_format_short_name(info->dst.format), info->src.box.width, info->src.box.height, diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 81533a464db..b62e9ea8544 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -3737,7 +3737,7 @@ zink_resource_image_barrier(struct zink_context *ctx, struct zink_resource *res, imb.dstQueueFamilyIndex = zink_screen(ctx->base.screen)->gfx_queue; res->dmabuf_acquire = false; } - bool marker = zink_cmd_debug_marker_begin(ctx, "image_barrier(%s->%s)", vk_ImageLayout_to_str(res->layout), vk_ImageLayout_to_str(new_layout)); + bool marker = zink_cmd_debug_marker_begin(ctx, cmdbuf, "image_barrier(%s->%s)", vk_ImageLayout_to_str(res->layout), vk_ImageLayout_to_str(new_layout)); VKCTX(CmdPipelineBarrier)( cmdbuf, res->obj->access_stage ? res->obj->access_stage : VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, @@ -3792,7 +3792,7 @@ zink_resource_image_barrier2(struct zink_context *ctx, struct zink_resource *res 1, &imb }; - bool marker = zink_cmd_debug_marker_begin(ctx, "image_barrier(%s->%s)", vk_ImageLayout_to_str(res->layout), vk_ImageLayout_to_str(new_layout)); + bool marker = zink_cmd_debug_marker_begin(ctx, cmdbuf, "image_barrier(%s->%s)", vk_ImageLayout_to_str(res->layout), vk_ImageLayout_to_str(new_layout)); VKCTX(CmdPipelineBarrier2)(cmdbuf, &dep); zink_cmd_debug_marker_end(ctx, marker); @@ -3897,7 +3897,7 @@ zink_resource_buffer_barrier(struct zink_context *ctx, struct zink_resource *res idx += snprintf(&buf[idx], sizeof(buf) - idx, "%s", vk_AccessFlagBits_to_str(1ul<batch.state->cmdbuf, &info); + VKCTX(CmdBeginDebugUtilsLabelEXT)(cmdbuf ? cmdbuf : ctx->batch.state->cmdbuf, &info); free(name); return true; diff --git a/src/gallium/drivers/zink/zink_context.h b/src/gallium/drivers/zink/zink_context.h index 0adaa4887e9..40ff9405792 100644 --- a/src/gallium/drivers/zink/zink_context.h +++ b/src/gallium/drivers/zink/zink_context.h @@ -253,7 +253,7 @@ struct zink_surface * zink_get_dummy_surface(struct zink_context *ctx, int samples_index); bool -zink_cmd_debug_marker_begin(struct zink_context *ctx, const char *fmt, ...); +zink_cmd_debug_marker_begin(struct zink_context *ctx, VkCommandBuffer cmdbuf, const char *fmt, ...); void zink_cmd_debug_marker_end(struct zink_context *ctx, bool emitted); diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c index 0c3636f5687..fd8e3e9b9a6 100644 --- a/src/gallium/drivers/zink/zink_query.c +++ b/src/gallium/drivers/zink/zink_query.c @@ -760,7 +760,7 @@ copy_pool_results_to_buffer(struct zink_context *ctx, struct zink_query *query, if (flags & VK_QUERY_RESULT_WITH_AVAILABILITY_BIT) result_size += type_size; - bool marker = zink_cmd_debug_marker_begin(ctx, "update_qbo(%s: id=%u, num_results=%d)", vk_QueryType_to_str(query->vkqtype), query_id, num_results); + bool marker = zink_cmd_debug_marker_begin(ctx, VK_NULL_HANDLE, "update_qbo(%s: id=%u, num_results=%d)", vk_QueryType_to_str(query->vkqtype), query_id, num_results); zink_batch_no_rp(ctx); /* if it's a single query that doesn't need special handling, we can copy it and be done */