From 451f030c068ccfa87aaab624d8e392875fd46c08 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Fri, 19 Jul 2019 00:00:03 +0200 Subject: [PATCH] radv: Fix uninitialized warning. For es_vgpr_comp_cnt. Fixes: 795adbbadd4 "radv/gfx10: Add pipeline state support for tess." Reviewed-by: Dave Airlie Reviewed-by: Samuel Pitoiset --- src/amd/vulkan/radv_shader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 3b00bf800b9..4262dae2860 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -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 */ -- 2.30.2