From ff4c991fd1c1f5f211ba9251f9c4701a1e013bf2 Mon Sep 17 00:00:00 2001 From: BillKristiansen Date: Thu, 11 Jun 2020 10:38:19 -0700 Subject: [PATCH] compiler/glsl: Initialize local variable to zero to fix MSVC RTC error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Without this, we get a run-time error about using an uninitialized variable. Reviewed-by: Marek Olšák Part-of: --- src/compiler/glsl/ast_to_hir.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)) { -- 2.30.2