aboutsummaryrefslogtreecommitdiffstats
path: root/ir_to_mesa.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-05-06 10:53:51 -0700
committerEric Anholt <[email protected]>2010-06-24 15:05:20 -0700
commit50ad96ebce6ea19b414a02d2d45f0b0c73586abf (patch)
treec7237c0e0b4b7a66f838e8e31003c409ecdb31b6 /ir_to_mesa.cpp
parent315c638b8cf0a92f9f0a8ee496e77e90e4b66d09 (diff)
ir_to_mesa: Start doing some int support.
Diffstat (limited to 'ir_to_mesa.cpp')
-rw-r--r--ir_to_mesa.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/ir_to_mesa.cpp b/ir_to_mesa.cpp
index 35c24ca174d..e77a6e2ddd3 100644
--- a/ir_to_mesa.cpp
+++ b/ir_to_mesa.cpp
@@ -349,6 +349,10 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
case ir_unop_sqrt:
this->result = this->create_tree(MB_TERM_sqrt_vec4, ir, op[0], op[1]);
break;
+ case ir_unop_i2f:
+ /* Mesa IR lacks types, ints are stored as floats. */
+ this->result = op[0];
+ break;
default:
break;
}
@@ -543,7 +547,10 @@ ir_to_mesa_visitor::visit(ir_constant *ir)
tree = this->create_tree(MB_TERM_reference_vec4, ir, NULL, NULL);
- assert(ir->type->base_type == GLSL_TYPE_FLOAT);
+ assert(ir->type->base_type == GLSL_TYPE_FLOAT ||
+ ir->type->base_type == GLSL_TYPE_UINT ||
+ ir->type->base_type == GLSL_TYPE_INT ||
+ ir->type->base_type == GLSL_TYPE_BOOL);
/* FINISHME: This will end up being _mesa_add_unnamed_constant,
* which handles sharing values and sharing channels of vec4