mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
freedreno/a3xx-a5xx: re-emit vertex state on VS change
On a3xx-a5xx information from vertex program is used to emit state related to vertex buffer. However this state is not re-emitted if only vertex program changes which causes rendering artifacts on gnome-shell where there are 2 draws with same vertex buffer but different shaders (due to changed vertex attribute destination regid). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35164>
This commit is contained in:
parent
02805fd900
commit
45e61f1203
3 changed files with 6 additions and 3 deletions
|
|
@ -42,7 +42,8 @@ draw_impl(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
|||
|
||||
fd3_emit_state(ctx, ring, emit);
|
||||
|
||||
if (emit->dirty & (FD_DIRTY_VTXBUF | FD_DIRTY_VTXSTATE))
|
||||
if ((ctx->dirty_shader[PIPE_SHADER_VERTEX] & FD_DIRTY_SHADER_PROG) ||
|
||||
(emit->dirty & (FD_DIRTY_VTXBUF | FD_DIRTY_VTXSTATE)))
|
||||
fd3_emit_vertex_bufs(ring, emit);
|
||||
|
||||
OUT_PKT0(ring, REG_A3XX_PC_VERTEX_REUSE_BLOCK_CNTL, 1);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,8 @@ draw_impl(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
|||
|
||||
fd4_emit_state(ctx, ring, emit);
|
||||
|
||||
if (emit->dirty & (FD_DIRTY_VTXBUF | FD_DIRTY_VTXSTATE))
|
||||
if ((ctx->dirty_shader[PIPE_SHADER_VERTEX] & FD_DIRTY_SHADER_PROG) ||
|
||||
(emit->dirty & (FD_DIRTY_VTXBUF | FD_DIRTY_VTXSTATE)))
|
||||
fd4_emit_vertex_bufs(ring, emit);
|
||||
|
||||
OUT_PKT0(ring, REG_A4XX_VFD_INDEX_OFFSET, 2);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,8 @@ draw_impl(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
|||
|
||||
fd5_emit_state(ctx, ring, emit);
|
||||
|
||||
if (emit->dirty & (FD_DIRTY_VTXBUF | FD_DIRTY_VTXSTATE))
|
||||
if ((ctx->dirty_shader[PIPE_SHADER_VERTEX] & FD_DIRTY_SHADER_PROG) ||
|
||||
(emit->dirty & (FD_DIRTY_VTXBUF | FD_DIRTY_VTXSTATE)))
|
||||
fd5_emit_vertex_bufs(ring, emit);
|
||||
|
||||
OUT_PKT4(ring, REG_A5XX_VFD_INDEX_OFFSET, 2);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue