mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
glsl/dead_builin_varyings: Fix gl_FragData array lowering
The current implementation looks for array dereferences on gl_FragData and
immediately proceeds to lower them, however this is not enough because we
can have array access on vector variables too, like in this code:
out vec4 color;
void main()
{
int i;
for (i = 0; i < 4; i++)
color[i] = 1.0;
}
Fix it by making sure that the actual variable being dereferenced is an array.
Fixes a crash in:
spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-ldexp-dvec4.shader_test
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
This commit is contained in:
parent
4f34722575
commit
750393ff7d
1 changed files with 1 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ public:
|
|||
{
|
||||
ir_variable *var = ir->variable_referenced();
|
||||
|
||||
if (!var || var->data.mode != this->mode)
|
||||
if (!var || var->data.mode != this->mode || !var->type->is_array())
|
||||
return visit_continue;
|
||||
|
||||
if (this->find_frag_outputs && var->data.location == FRAG_RESULT_DATA0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue