mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
gallium/tessellator: Fix uninitialized variable warnings.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10806>
This commit is contained in:
parent
020c3c403f
commit
2d35857705
1 changed files with 7 additions and 0 deletions
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
#include "tessellator.hpp"
|
||||
#include "util/macros.h"
|
||||
#if defined(_MSC_VER)
|
||||
#include <math.h> // 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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue