From: BillKristiansen Date: Thu, 11 Jun 2020 17:38:19 +0000 (-0700) Subject: compiler/glsl: Initialize local variable to zero to fix MSVC RTC error X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ff4c991fd1c1f5f211ba9251f9c4701a1e013bf2;p=mesa.git 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 Part-of: --- diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index c406ae28ec2..6c0c3b6f365 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -8007,7 +8007,7 @@ ast_interface_block::hir(exec_list *instructions, 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 @@ ast_interface_block::hir(exec_list *instructions, } } - 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)) {