diff options
author | tiffany <tiffany@stormbit.net> | 2014-08-30 12:30:00 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2014-09-03 13:52:39 -0600 |
commit | cfc42db592a7d9684d5cee8d4238a0b2dd6f0603 (patch) | |
tree | 54cf9db8ab2f47af36fc5f5433abb80bd8e7cf93 | |
parent | 11ee9a4d99fd68be4c09341225e7faeff70d1b9b (diff) |
glsl: fix assertion which fails for unsigned array indices.
According to the GLSL 1.40 spec, section 5.7 Structure and Array Operations:
"Array elements are accessed using an expression whose type is int or uint."
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r-- | src/glsl/lower_variable_index_to_cond_assign.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/lower_variable_index_to_cond_assign.cpp b/src/glsl/lower_variable_index_to_cond_assign.cpp index 7c5d80f432b..d878cb07811 100644 --- a/src/glsl/lower_variable_index_to_cond_assign.cpp +++ b/src/glsl/lower_variable_index_to_cond_assign.cpp @@ -76,7 +76,7 @@ compare_index_block(exec_list *instructions, ir_variable *index, ir_rvalue *broadcast_index = new(mem_ctx) ir_dereference_variable(index); assert(index->type->is_scalar()); - assert(index->type->base_type == GLSL_TYPE_INT); + assert(index->type->base_type == GLSL_TYPE_INT || index->type->base_type == GLSL_TYPE_UINT); assert(components >= 1 && components <= 4); if (components > 1) { |