Mesa (master): glsl: fix crash when a const is passed to texelFetchOffset

Dave Airlie airlied at kemper.freedesktop.org
Thu Aug 25 13:08:58 PDT 2011


Module: Mesa
Branch: master
Commit: 8ce716257a3529d0aa750d7a7b344984c5ac4274
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8ce716257a3529d0aa750d7a7b344984c5ac4274

Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Aug 25 21:05:13 2011 +0100

glsl: fix crash when a const is passed to texelFetchOffset

while debugging texelFetchOffset we kept hitting the assert.

Signed-off-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/glsl/ast_function.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
index 8b79d85..ca45934 100644
--- a/src/glsl/ast_function.cpp
+++ b/src/glsl/ast_function.cpp
@@ -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);



More information about the mesa-commit mailing list