radv: set gfx pipeline vtx_emit_num to the number of sgprs

this should always match what we want to be doing

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8788>
This commit is contained in:
Mike Blumenkrantz 2021-02-05 13:13:58 -05:00 committed by Marge Bot
parent 65626eba29
commit eed676c42a
1 changed files with 1 additions and 4 deletions

View File

@ -5442,10 +5442,7 @@ radv_pipeline_init_shader_stages_state(struct radv_pipeline *pipeline)
if (loc->sgpr_idx != -1) {
pipeline->graphics.vtx_base_sgpr = pipeline->user_data_0[MESA_SHADER_VERTEX];
pipeline->graphics.vtx_base_sgpr += loc->sgpr_idx * 4;
if (radv_get_shader(pipeline, MESA_SHADER_VERTEX)->info.vs.needs_draw_id)
pipeline->graphics.vtx_emit_num = 3;
else
pipeline->graphics.vtx_emit_num = 2;
pipeline->graphics.vtx_emit_num = loc->num_sgprs;
}
}