Commit 23819040 authored by Christian Gmeiner's avatar Christian Gmeiner Committed by Marge Bot
Browse files

etnaviv: explicitly call resource_written(..)

We might end in cases where etna_acc_get_query_result(..) gets called
within one draw call (aka before flushing). At this point the status
of the resource was not set but gets used in etna_acc_get_query_result(..)
to handle different wait cases. Fix this issue by calling resource_written(..)
Signed-off-by: Christian Gmeiner's avatarChristian Gmeiner <>
Part-of: <mesa/mesa!1530>
parent f2c48925
......@@ -347,9 +347,6 @@ etna_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
list_for_each_entry(struct etna_acc_query, aq, &ctx->active_acc_queries, node)
resource_written(ctx, aq->prsc);
ctx->stats.prims_emitted += u_reduced_prims_for_vertices(info->mode, info->count);
......@@ -59,6 +59,7 @@ occlusion_resume(struct etna_acc_query *aq, struct etna_context *ctx)
r.offset = aq->samples * 8; /* 64bit value */
etna_set_state_reloc(ctx->stream, VIVS_GL_OCCLUSION_QUERY_ADDR, &r);
resource_written(ctx, aq->prsc);
static void
......@@ -66,6 +67,7 @@ occlusion_suspend(struct etna_acc_query *aq, struct etna_context *ctx)
/* 0x1DF5E76 is the value used by blob - but any random value will work */
etna_set_state(ctx->stream, VIVS_GL_OCCLUSION_QUERY_CONTROL, 0x1DF5E76);
resource_written(ctx, aq->prsc);
static void
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment