summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorDanylo Piliaiev <[email protected]>2019-11-21 15:04:37 +0200
committerDanylo Piliaiev <[email protected]>2019-11-22 15:25:56 +0000
commit25a00b449fbd877716f4732aa116640d58246182 (patch)
treefd03d06e0397bcfd6d6959ed569c5aa7a56a2eca /src/compiler
parent4c43b354c3aabe308302405a79bc0be5a8cde91f (diff)
glsl: Add varyings to "zero-init of uninitialized vars" workaround
Varyings are similar to already handled cases. And "glsl_zero_init" name of the workaround already looks like it should include varyings. The issue was observed in GiMark subtest from GpuTest. Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/ast_to_hir.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 214412bc30a..7b7f6aff62a 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -5195,7 +5195,8 @@ ast_declarator_list::hir(exec_list *instructions,
apply_layout_qualifier_to_variable(&this->type->qualifier, var, state,
&loc);
- if ((var->data.mode == ir_var_auto || var->data.mode == ir_var_temporary)
+ if ((var->data.mode == ir_var_auto || var->data.mode == ir_var_temporary
+ || var->data.mode == ir_var_shader_out)
&& (var->type->is_numeric() || var->type->is_boolean())
&& state->zero_init) {
const ir_constant_data data = { { 0 } };