From 2d358577050d2af0c34e4ca49abae4c806315c68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Fri, 14 May 2021 16:31:13 +0200 Subject: [PATCH] gallium/tessellator: Fix uninitialized variable warnings. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Timur Kristóf Reviewed-by: Adam Jackson Reviewed-by: Alyssa Rosenzweig Part-of: --- src/gallium/auxiliary/tessellator/tessellator.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/auxiliary/tessellator/tessellator.cpp b/src/gallium/auxiliary/tessellator/tessellator.cpp index c2dc40f571e..952928b060b 100644 --- a/src/gallium/auxiliary/tessellator/tessellator.cpp +++ b/src/gallium/auxiliary/tessellator/tessellator.cpp @@ -18,6 +18,7 @@ */ #include "tessellator.hpp" +#include "util/macros.h" #if defined(_MSC_VER) #include // ceil #else @@ -2228,6 +2229,8 @@ void CHLSLTessellator::QuadHLSLProcessTessFactors( float tessFactor_Ueq0, float case PIPE_TESSELLATOR_REDUCTION_AVERAGE: insideTessFactor[U] = (tessFactor_Veq0 + tessFactor_Veq1 + tessFactor_Ueq0 + tessFactor_Ueq1) / 4; break; + default: + unreachable("impossible m_insideTessFactorReduction"); } // Scale inside tessFactor based on user scale factor. @@ -2293,6 +2296,8 @@ void CHLSLTessellator::QuadHLSLProcessTessFactors( float tessFactor_Ueq0, float insideTessFactor[U] = (tessFactor_Veq0 + tessFactor_Veq1) / 2; insideTessFactor[V] = (tessFactor_Ueq0 + tessFactor_Ueq1) / 2; break; + default: + unreachable("impossible m_insideTessFactorReduction"); } // Scale inside tessFactors based on user scale factor. @@ -2464,6 +2469,8 @@ void CHLSLTessellator::TriHLSLProcessTessFactors( float tessFactor_Ueq0, float t case PIPE_TESSELLATOR_REDUCTION_AVERAGE: insideTessFactor = (tessFactor_Ueq0 + tessFactor_Veq0 + tessFactor_Weq0) / 3; break; + default: + unreachable("impossible m_insideTessFactorReduction"); } // Scale inside TessFactor based on user scale factor.