radv: Fix uninitialized warning.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 18 Jul 2019 22:00:03 +0000 (00:00 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sat, 20 Jul 2019 23:39:08 +0000 (01:39 +0200)
For es_vgpr_comp_cnt.

Fixes: 795adbbadd4 "radv/gfx10: Add pipeline state support for tess."
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_shader.c

index 3b00bf8..4262dae 100644 (file)
@@ -810,7 +810,8 @@ static void radv_postprocess_config(const struct radv_physical_device *pdevice,
                } else if (es_stage == MESA_SHADER_TESS_EVAL) {
                        bool enable_prim_id = info->tes.export_prim_id || info->info.uses_prim_id;
                        es_vgpr_comp_cnt = enable_prim_id ? 3 : 2;
-               }
+               } else
+                       unreachable("Unexpected ES shader stage");
 
                bool tes_triangles = stage == MESA_SHADER_TESS_EVAL &&
                        info->tes.primitive_mode >= 4; /* GL_TRIANGLES */