From 70b44a6762f6ee0795baab125ddd4919566b1111 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Sun, 26 Jan 2025 14:32:12 +0100 Subject: [PATCH] etnaviv: emit PS start and end PC states only on shader changes There is no reason to emit those states on framebuffer changes. While the framebuffer format change might change the fragment shader due to R/B swapping in the shader, this triggers compilation of a new shader variant which will dirty the shader state as needed. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner Part-of: --- src/gallium/drivers/etnaviv/etnaviv_emit.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_emit.c b/src/gallium/drivers/etnaviv/etnaviv_emit.c index 50fd8903476..48167a7fe9b 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_emit.c +++ b/src/gallium/drivers/etnaviv/etnaviv_emit.c @@ -217,10 +217,8 @@ emit_pre_halti5_state(struct etna_context *ctx) /*00E40*/ EMIT_STATE(RA_CENTROID_TABLE(x), ctx->framebuffer.RA_CENTROID_TABLE[x]); } } - if (unlikely(dirty & (ETNA_DIRTY_SHADER | ETNA_DIRTY_FRAMEBUFFER))) { + if (unlikely(dirty & (ETNA_DIRTY_SHADER))) { /*01000*/ EMIT_STATE(PS_END_PC, ctx->shader_state.PS_END_PC); - } - if (unlikely(dirty & (ETNA_DIRTY_SHADER | ETNA_DIRTY_FRAMEBUFFER))) { /*01018*/ EMIT_STATE(PS_START_PC, ctx->shader_state.PS_START_PC); } if (unlikely(dirty & (ETNA_DIRTY_SHADER))) {