mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
zink: sprinkle in a bunch of MESA_TRACE_FUNC
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36984>
This commit is contained in:
parent
9d0203bace
commit
dfab0e952b
8 changed files with 19 additions and 0 deletions
|
|
@ -59,6 +59,7 @@ reset_obj_list(struct zink_screen *screen, struct zink_batch_state *bs, struct z
|
|||
void
|
||||
zink_reset_batch_state(struct zink_context *ctx, struct zink_batch_state *bs)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct zink_screen *screen = zink_screen(ctx->base.screen);
|
||||
|
||||
VkResult result = VKSCR(ResetCommandPool)(screen->dev, bs->cmdpool, 0);
|
||||
|
|
@ -420,6 +421,7 @@ find_unused_state(struct zink_batch_state *bs)
|
|||
static struct zink_batch_state *
|
||||
get_batch_state(struct zink_context *ctx)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct zink_screen *screen = zink_screen(ctx->base.screen);
|
||||
struct zink_batch_state *bs = NULL;
|
||||
|
||||
|
|
@ -509,6 +511,7 @@ zink_batch_bind_db(struct zink_context *ctx)
|
|||
void
|
||||
zink_start_batch(struct zink_context *ctx)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct zink_screen *screen = zink_screen(ctx->base.screen);
|
||||
zink_reset_batch(ctx);
|
||||
struct zink_batch_state *bs = ctx->bs;
|
||||
|
|
@ -572,6 +575,7 @@ zink_start_batch(struct zink_context *ctx)
|
|||
static void
|
||||
post_submit(void *data, void *gdata, int thread_index)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct zink_batch_state *bs = data;
|
||||
struct zink_screen *screen = zink_screen(bs->ctx->base.screen);
|
||||
|
||||
|
|
@ -607,6 +611,7 @@ typedef enum {
|
|||
static void
|
||||
submit_queue(void *data, void *gdata, int thread_index)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct zink_batch_state *bs = data;
|
||||
struct zink_context *ctx = bs->ctx;
|
||||
struct zink_screen *screen = zink_screen(ctx->base.screen);
|
||||
|
|
@ -797,6 +802,7 @@ end:
|
|||
void
|
||||
zink_end_batch(struct zink_context *ctx)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
if (!ctx->queries_disabled)
|
||||
zink_suspend_queries(ctx);
|
||||
|
||||
|
|
@ -1050,6 +1056,7 @@ batch_reference_resource_move_internal(struct zink_batch_state *bs, struct zink_
|
|||
bool
|
||||
zink_batch_reference_resource_move(struct zink_context *ctx, struct zink_resource *res)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct zink_batch_state *bs = ctx->bs;
|
||||
|
||||
/* swapchains are special */
|
||||
|
|
@ -1159,6 +1166,7 @@ zink_batch_usage_check_completion(struct zink_context *ctx, const struct zink_ba
|
|||
static void
|
||||
batch_usage_wait(struct zink_context *ctx, struct zink_batch_usage *u, unsigned submit_count, bool trywait)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
if (!zink_batch_usage_exists(u))
|
||||
return;
|
||||
/* this batch state was already completed and reset */
|
||||
|
|
|
|||
|
|
@ -1365,6 +1365,7 @@ zink_set_vertex_buffers_internal(struct pipe_context *pctx,
|
|||
const struct pipe_vertex_buffer *buffers,
|
||||
bool optimal)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct zink_context *ctx = zink_context(pctx);
|
||||
const bool have_input_state = zink_screen(pctx->screen)->info.have_EXT_vertex_input_dynamic_state;
|
||||
const bool need_state_change = !zink_screen(pctx->screen)->info.have_EXT_extended_dynamic_state &&
|
||||
|
|
|
|||
|
|
@ -338,6 +338,7 @@ zink_draw(struct pipe_context *pctx,
|
|||
struct pipe_vertex_state *vstate,
|
||||
uint32_t partial_velem_mask)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
if (!dindirect && (!draws[0].count || !dinfo->instance_count))
|
||||
return;
|
||||
|
||||
|
|
@ -976,6 +977,7 @@ template <util_popcnt HAS_POPCNT>
|
|||
static void
|
||||
zink_bind_vertex_state(struct zink_context *ctx, struct pipe_vertex_state *vstate, uint32_t partial_velem_mask)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct zink_vertex_state *zstate = (struct zink_vertex_state *)vstate;
|
||||
VkCommandBuffer cmdbuf = ctx->bs->cmdbuf;
|
||||
if (!vstate->input.vbuffer.buffer.resource)
|
||||
|
|
@ -1000,6 +1002,7 @@ zink_draw_vertex_state(struct pipe_context *pctx,
|
|||
const struct pipe_draw_start_count_bias *draws,
|
||||
unsigned num_draws)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct pipe_draw_info dinfo = {};
|
||||
|
||||
dinfo.mode = info.mode;
|
||||
|
|
@ -1026,6 +1029,7 @@ template <bool BATCH_CHANGED>
|
|||
static void
|
||||
zink_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct zink_context *ctx = zink_context(pctx);
|
||||
struct zink_batch_state *bs = ctx->bs;
|
||||
struct zink_screen *screen = zink_screen(pctx->screen);
|
||||
|
|
|
|||
|
|
@ -719,6 +719,7 @@ replace_separable_prog(struct zink_context *ctx, struct hash_entry *entry, struc
|
|||
void
|
||||
zink_gfx_program_update_optimal(struct zink_context *ctx)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct zink_screen *screen = zink_screen(ctx->base.screen);
|
||||
assert(!ctx->gfx_stages[MESA_SHADER_TESS_CTRL] || !ctx->gfx_stages[MESA_SHADER_TESS_CTRL]->non_fs.is_generated);
|
||||
if (ctx->gfx_dirty) {
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ zink_get_gfx_pipeline(struct zink_context *ctx,
|
|||
struct zink_gfx_pipeline_state *state,
|
||||
enum mesa_prim mode)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct zink_screen *screen = zink_screen(ctx->base.screen);
|
||||
bool uses_dynamic_stride = state->uses_dynamic_stride;
|
||||
|
||||
|
|
|
|||
|
|
@ -2327,6 +2327,7 @@ zink_buffer_map(struct pipe_context *pctx,
|
|||
const struct pipe_box *box,
|
||||
struct pipe_transfer **transfer)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct zink_context *ctx = zink_context(pctx);
|
||||
struct zink_screen *screen = zink_screen(pctx->screen);
|
||||
struct zink_resource *res = zink_resource(pres);
|
||||
|
|
@ -2539,6 +2540,7 @@ zink_image_map(struct pipe_context *pctx,
|
|||
const struct pipe_box *box,
|
||||
struct pipe_transfer **transfer)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
struct zink_context *ctx = zink_context(pctx);
|
||||
struct zink_screen *screen = zink_screen(pctx->screen);
|
||||
struct zink_resource *res = zink_resource(pres);
|
||||
|
|
|
|||
|
|
@ -2419,6 +2419,7 @@ zink_screen_import_dmabuf_semaphore(struct zink_screen *screen, struct zink_reso
|
|||
bool
|
||||
zink_screen_timeline_wait(struct zink_screen *screen, uint64_t batch_id, uint64_t timeout)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
VkSemaphoreWaitInfo wi = {0};
|
||||
|
||||
if (zink_screen_check_last_finished(screen, batch_id))
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@
|
|||
#include "zink_instance.h"
|
||||
#include "zink_shader_keys.h"
|
||||
#include "vk_dispatch_table.h"
|
||||
#include "util/perf/cpu_trace.h"
|
||||
|
||||
#include "renderdoc_app.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue