mesa: set up gl_vert_result and gl_frag_attrib values for gl_ClipDistance.
[mesa.git] / src / glsl / ir_constant_expression.cpp
index 2a3084896569eaecb9ee734ad6698d53cc15661b..f0299a2c4a0bfe5c11a095811c17935cbe5d10b0 100644 (file)
@@ -166,7 +166,18 @@ ir_expression::constant_expression_value()
         data.b[c] = op[0]->value.u[c] ? true : false;
       }
       break;
-
+   case ir_unop_u2i:
+      assert(op[0]->type->base_type == GLSL_TYPE_UINT);
+      for (unsigned c = 0; c < op[0]->type->components(); c++) {
+        data.i[c] = op[0]->value.u[c];
+      }
+      break;
+   case ir_unop_i2u:
+      assert(op[0]->type->base_type == GLSL_TYPE_INT);
+      for (unsigned c = 0; c < op[0]->type->components(); c++) {
+        data.u[c] = op[0]->value.i[c];
+      }
+      break;
    case ir_unop_any:
       assert(op[0]->type->is_boolean());
       data.b[0] = false;