Mesa (master): ir_to_mesa: Don' t assume that an ir_dereference_array is of a variable.
Eric Anholt
anholt at kemper.freedesktop.org
Thu Aug 26 18:27:07 UTC 2010
Module: Mesa
Branch: master
Commit: 264ba1ab88f273dc92add8018f24edcdd67fa5e5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=264ba1ab88f273dc92add8018f24edcdd67fa5e5
Author: Eric Anholt <eric at anholt.net>
Date: Thu Aug 26 11:23:09 2010 -0700
ir_to_mesa: Don't assume that an ir_dereference_array is of a variable.
Fixes:
glsl-array-bounds-02 (software)
glsl-array-bounds-04
glsl-array-bounds-06 (software)
glsl-array-bounds-08
---
src/mesa/program/ir_to_mesa.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 7fb5974..948f09a 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -1382,7 +1382,8 @@ ir_to_mesa_visitor::visit(ir_dereference_array *ir)
return;
}
- if (strncmp(var->name, "gl_", 3) == 0 && var->mode == ir_var_uniform &&
+ if (var &&
+ strncmp(var->name, "gl_", 3) == 0 && var->mode == ir_var_uniform &&
!var->type->is_matrix()) {
ir_dereference_record *record = NULL;
if (ir->array->ir_type == ir_type_dereference_record)
More information about the mesa-commit
mailing list