glsl: fix crash when a const is passed to texelFetchOffset
authorDave Airlie <airlied@redhat.com>
Thu, 25 Aug 2011 20:05:13 +0000 (21:05 +0100)
committerDave Airlie <airlied@redhat.com>
Thu, 25 Aug 2011 20:07:42 +0000 (21:07 +0100)
while debugging texelFetchOffset we kept hitting the assert.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/ast_function.cpp

index 8b79d85..ca45934 100644 (file)
@@ -195,6 +195,7 @@ match_function_by_name(exec_list *instructions, const char *name,
 
         if (formal->type->is_numeric() || formal->type->is_boolean()) {
             switch (formal->mode) {
+            case ir_var_const_in:
             case ir_var_in: {
                ir_rvalue *converted
                   = convert_component(actual, formal->type);