mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 15:00:10 +01:00
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 <danylo.piliaiev@globallogic.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
4c43b354c3
commit
25a00b449f
1 changed files with 2 additions and 1 deletions
|
|
@ -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 } };
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue