radv: fix bogus assertion with RADV_FORCE_VRS

It supports VS, TES and GS.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18345>
This commit is contained in:
Samuel Pitoiset
2022-08-31 16:41:21 +02:00
committed by Marge Bot
parent f0d10d0352
commit 047738daa7

View File

@@ -4529,6 +4529,7 @@ radv_create_shaders(struct radv_pipeline *pipeline, struct radv_pipeline_layout
/* Force per-vertex VRS. */
if (radv_consider_force_vrs(pipeline, noop_fs, stages, *last_vgt_api_stage)) {
assert(*last_vgt_api_stage == MESA_SHADER_VERTEX ||
*last_vgt_api_stage == MESA_SHADER_TESS_EVAL ||
*last_vgt_api_stage == MESA_SHADER_GEOMETRY);
nir_shader *last_vgt_shader = stages[*last_vgt_api_stage].nir;
NIR_PASS(_, last_vgt_shader, radv_force_primitive_shading_rate, device);