From d4d8273688f44ae5b1fa4ca1f94e140aa5d86d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Ondra=C4=8Dka?= Date: Fri, 29 May 2026 12:47:11 +0200 Subject: [PATCH] r300: remove dead first-time build path from r300_pick_vertex_shader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit r300_create_vs_state always allocates vs->first and builds the initial shader variant before the state can be bound, so the !vs->first path in r300_pick_vertex_shader is unreachable. Signed-off-by: Pavel Ondračka Part-of: --- src/gallium/drivers/r300/r300_state_derived.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c index 73b03204747..864d36f0b77 100644 --- a/src/gallium/drivers/r300/r300_state_derived.c +++ b/src/gallium/drivers/r300/r300_state_derived.c @@ -1055,17 +1055,6 @@ static void r300_pick_vertex_shader(struct r300_context *r300) if (r300->vs_state.state) { bool wpos = r300_fs(r300)->shader->inputs.wpos != ATTR_UNUSED; - if (!vs->first) { - /* Build the vertex shader for the first time. */ - vs->first = vs->shader = CALLOC_STRUCT(r300_vertex_shader_code); - vs->first->wpos = wpos; - r300_translate_vertex_shader(r300, vs); - if (!vs->first->dummy) { - r300_mark_vs_code_dirty(r300); - r300_mark_atom_dirty(r300, &r300->rs_block_state); - } - return; - } /* Pick the vertex shader based on whether we need wpos */ if (vs->first->wpos != wpos) { if (vs->first->next && vs->first->next->wpos == wpos) {