[Mesa-stable] [PATCH 4/4] glsl: Don't abort if array index is out of bounds
Anuj Phogat
anuj.phogat at gmail.com
Mon Sep 22 15:57:40 PDT 2014
Currently abort happens for this shader:
[fragment shader]
float array[5];
const int idx = 8;
void main()
{
gl_FragColor = vec4(0.0, 1.0, 0.0, array[idx]);
}
Cc: <mesa-stable at lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
---
src/glsl/ir_validate.cpp | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index 97a581d..2d4028f 100644
--- a/src/glsl/ir_validate.cpp
+++ b/src/glsl/ir_validate.cpp
@@ -669,7 +669,6 @@ ir_validate::visit(ir_variable *ir)
printf("ir_variable has maximum access out of bounds (%d vs %d)\n",
ir->data.max_array_access, ir->type->length - 1);
ir->print();
- abort();
}
}
@@ -687,7 +686,6 @@ ir_validate::visit(ir_variable *ir)
"field %s (%d vs %d)\n", fields[i].name,
ir->max_ifc_array_access[i], fields[i].type->length);
ir->print();
- abort();
}
}
}
--
1.9.3
More information about the mesa-stable
mailing list