mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
panfrost: Fix dirty state emission
If we have per-draw state (vertex ID stuff), there's an ordering mismatch. Fixes dEQP-GLES31.functional.draw_base_vertex.draw_elements_instanced_base_vertex.builtin_variable.vertex_id on Midgard, and I'm not sure why it was passing on Bifrost before. Also should fix (on both architectures) DRAWID issues. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123>
This commit is contained in:
parent
43cff98dff
commit
bc48df001c
1 changed files with 10 additions and 5 deletions
|
|
@ -567,6 +567,11 @@ panfrost_direct_draw(struct panfrost_batch *batch,
|
|||
mali_ptr attribs, attrib_bufs;
|
||||
attribs = panfrost_emit_vertex_data(batch, &attrib_bufs);
|
||||
|
||||
panfrost_update_state_3d(batch);
|
||||
panfrost_update_state_vs(batch);
|
||||
panfrost_update_state_fs(batch);
|
||||
panfrost_clean_state_3d(ctx);
|
||||
|
||||
/* Fire off the draw itself */
|
||||
panfrost_draw_emit_vertex(batch, info, &invocation,
|
||||
vs_vary, varyings, attribs, attrib_bufs, vertex.cpu);
|
||||
|
|
@ -641,6 +646,11 @@ panfrost_indirect_draw(struct panfrost_batch *batch,
|
|||
ctx->base_vertex_sysval_ptr = 0;
|
||||
ctx->base_instance_sysval_ptr = 0;
|
||||
|
||||
panfrost_update_state_3d(batch);
|
||||
panfrost_update_state_vs(batch);
|
||||
panfrost_update_state_fs(batch);
|
||||
panfrost_clean_state_3d(ctx);
|
||||
|
||||
bool point_coord_replace = (info->mode == PIPE_PRIM_POINTS);
|
||||
|
||||
panfrost_emit_varying_descriptor(batch, 0,
|
||||
|
|
@ -767,11 +777,6 @@ panfrost_draw_vbo(struct pipe_context *pipe,
|
|||
/* Conservatively assume draw parameters always change */
|
||||
ctx->dirty |= PAN_DIRTY_PARAMS | PAN_DIRTY_DRAWID;
|
||||
|
||||
panfrost_update_state_3d(batch);
|
||||
panfrost_update_state_vs(batch);
|
||||
panfrost_update_state_fs(batch);
|
||||
panfrost_clean_state_3d(ctx);
|
||||
|
||||
if (indirect) {
|
||||
assert(num_draws == 1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue