compiler/glsl: Initialize local variable to zero to fix MSVC RTC error
Without this, we get a run-time error about using an uninitialized
variable.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6221>
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index c406ae2..6c0c3b6 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -8007,7 +8007,7 @@
return NULL;
}
- unsigned qual_xfb_offset;
+ unsigned qual_xfb_offset = 0;
if (layout.flags.q.explicit_xfb_offset) {
if (!process_qualifier_constant(state, &loc, "xfb_offset",
layout.offset, &qual_xfb_offset)) {
@@ -8015,7 +8015,7 @@
}
}
- unsigned qual_xfb_stride;
+ unsigned qual_xfb_stride = 0;
if (layout.flags.q.explicit_xfb_stride) {
if (!process_qualifier_constant(state, &loc, "xfb_stride",
layout.xfb_stride, &qual_xfb_stride)) {