r300: remove dead first-time build path from r300_pick_vertex_shader

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 <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41925>
This commit is contained in:
Pavel Ondračka 2026-05-29 12:47:11 +02:00
parent 78f49dc25b
commit d4d8273688

View file

@ -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) {