mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
zink: pull 'was_line_loop' into ctx for query updating
make this a bit more flexible Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
This commit is contained in:
parent
5492e927e7
commit
cbbc7c98c4
4 changed files with 8 additions and 5 deletions
|
|
@ -399,6 +399,8 @@ zink_draw(struct pipe_context *pctx,
|
|||
assert(index_size != 1 || screen->info.have_EXT_index_type_uint8);
|
||||
}
|
||||
|
||||
ctx->was_line_loop = dinfo->was_line_loop;
|
||||
|
||||
bool have_streamout = !!ctx->num_so_targets;
|
||||
if (have_streamout) {
|
||||
zink_emit_xfb_counter_barrier(ctx);
|
||||
|
|
@ -434,7 +436,7 @@ zink_draw(struct pipe_context *pctx,
|
|||
res->obj->unordered_read = false;
|
||||
}
|
||||
|
||||
zink_query_update_gs_states(ctx, dinfo->was_line_loop);
|
||||
zink_query_update_gs_states(ctx);
|
||||
|
||||
if (unlikely(zink_debug & ZINK_DEBUG_SYNC)) {
|
||||
zink_batch_no_rp(ctx);
|
||||
|
|
|
|||
|
|
@ -1163,7 +1163,7 @@ zink_resume_cs_query(struct zink_context *ctx)
|
|||
}
|
||||
|
||||
void
|
||||
zink_query_update_gs_states(struct zink_context *ctx, bool was_line_loop)
|
||||
zink_query_update_gs_states(struct zink_context *ctx)
|
||||
{
|
||||
struct zink_query *query;
|
||||
bool suspendall = false;
|
||||
|
|
@ -1185,7 +1185,7 @@ zink_query_update_gs_states(struct zink_context *ctx, bool was_line_loop)
|
|||
query = ctx->vertices_query;
|
||||
struct zink_query_start *last_start = util_dynarray_top_ptr(&query->starts, struct zink_query_start);
|
||||
assert(query->active);
|
||||
if (last_start->was_line_loop != was_line_loop) {
|
||||
if (last_start->was_line_loop != ctx->was_line_loop) {
|
||||
suspendall = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -1203,7 +1203,7 @@ zink_query_update_gs_states(struct zink_context *ctx, bool was_line_loop)
|
|||
if (ctx->vertices_query) {
|
||||
query = ctx->vertices_query;
|
||||
struct zink_query_start *last_start = util_dynarray_top_ptr(&query->starts, struct zink_query_start);
|
||||
last_start->was_line_loop = was_line_loop;
|
||||
last_start->was_line_loop = ctx->was_line_loop;
|
||||
query->has_draws = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ void
|
|||
zink_prune_query(struct zink_screen *screen, struct zink_batch_state *bs, struct zink_query *query);
|
||||
|
||||
void
|
||||
zink_query_update_gs_states(struct zink_context *ctx, bool was_line_loop);
|
||||
zink_query_update_gs_states(struct zink_context *ctx);
|
||||
|
||||
void
|
||||
zink_start_conditional_render(struct zink_context *ctx);
|
||||
|
|
|
|||
|
|
@ -1737,6 +1737,7 @@ struct zink_context {
|
|||
struct list_head primitives_generated_queries;
|
||||
struct zink_query *vertices_query;
|
||||
bool disable_color_writes;
|
||||
bool was_line_loop;
|
||||
bool primitives_generated_active;
|
||||
bool queries_disabled, render_condition_active;
|
||||
struct {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue