summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ast_function.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/ast_function.cpp')
-rw-r--r--src/compiler/glsl/ast_function.cpp79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/compiler/glsl/ast_function.cpp b/src/compiler/glsl/ast_function.cpp
index 3265712942c..2a2c17bd42c 100644
--- a/src/compiler/glsl/ast_function.cpp
+++ b/src/compiler/glsl/ast_function.cpp
@@ -760,6 +760,12 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
case GLSL_TYPE_DOUBLE:
result = new(ctx) ir_expression(ir_unop_d2u, src);
break;
+ case GLSL_TYPE_UINT64:
+ result = new(ctx) ir_expression(ir_unop_u642u, src);
+ break;
+ case GLSL_TYPE_INT64:
+ result = new(ctx) ir_expression(ir_unop_i642u, src);
+ break;
}
break;
case GLSL_TYPE_INT:
@@ -776,6 +782,12 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
case GLSL_TYPE_DOUBLE:
result = new(ctx) ir_expression(ir_unop_d2i, src);
break;
+ case GLSL_TYPE_UINT64:
+ result = new(ctx) ir_expression(ir_unop_u642i, src);
+ break;
+ case GLSL_TYPE_INT64:
+ result = new(ctx) ir_expression(ir_unop_i642i, src);
+ break;
}
break;
case GLSL_TYPE_FLOAT:
@@ -792,6 +804,12 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
case GLSL_TYPE_DOUBLE:
result = new(ctx) ir_expression(ir_unop_d2f, desired_type, src, NULL);
break;
+ case GLSL_TYPE_UINT64:
+ result = new(ctx) ir_expression(ir_unop_u642f, desired_type, src, NULL);
+ break;
+ case GLSL_TYPE_INT64:
+ result = new(ctx) ir_expression(ir_unop_i642f, desired_type, src, NULL);
+ break;
}
break;
case GLSL_TYPE_BOOL:
@@ -810,6 +828,14 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
case GLSL_TYPE_DOUBLE:
result = new(ctx) ir_expression(ir_unop_d2b, desired_type, src, NULL);
break;
+ case GLSL_TYPE_UINT64:
+ result = new(ctx) ir_expression(ir_unop_i642b,
+ new(ctx) ir_expression(ir_unop_u642i64,
+ src));
+ break;
+ case GLSL_TYPE_INT64:
+ result = new(ctx) ir_expression(ir_unop_i642b, desired_type, src, NULL);
+ break;
}
break;
case GLSL_TYPE_DOUBLE:
@@ -828,7 +854,60 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
case GLSL_TYPE_FLOAT:
result = new(ctx) ir_expression(ir_unop_f2d, desired_type, src, NULL);
break;
+ case GLSL_TYPE_UINT64:
+ result = new(ctx) ir_expression(ir_unop_u642d, desired_type, src, NULL);
+ break;
+ case GLSL_TYPE_INT64:
+ result = new(ctx) ir_expression(ir_unop_i642d, desired_type, src, NULL);
+ break;
}
+ break;
+ case GLSL_TYPE_UINT64:
+ switch (b) {
+ case GLSL_TYPE_INT:
+ result = new(ctx) ir_expression(ir_unop_i2u64, src);
+ break;
+ case GLSL_TYPE_UINT:
+ result = new(ctx) ir_expression(ir_unop_u2u64, src);
+ break;
+ case GLSL_TYPE_BOOL:
+ result = new(ctx) ir_expression(ir_unop_i642u64,
+ new(ctx) ir_expression(ir_unop_b2i64,
+ src));
+ break;
+ case GLSL_TYPE_FLOAT:
+ result = new(ctx) ir_expression(ir_unop_f2u64, src);
+ break;
+ case GLSL_TYPE_DOUBLE:
+ result = new(ctx) ir_expression(ir_unop_d2u64, src);
+ break;
+ case GLSL_TYPE_INT64:
+ result = new(ctx) ir_expression(ir_unop_i642u64, src);
+ break;
+ }
+ break;
+ case GLSL_TYPE_INT64:
+ switch (b) {
+ case GLSL_TYPE_INT:
+ result = new(ctx) ir_expression(ir_unop_i2i64, src);
+ break;
+ case GLSL_TYPE_UINT:
+ result = new(ctx) ir_expression(ir_unop_u2i64, src);
+ break;
+ case GLSL_TYPE_BOOL:
+ result = new(ctx) ir_expression(ir_unop_b2i64, src);
+ break;
+ case GLSL_TYPE_FLOAT:
+ result = new(ctx) ir_expression(ir_unop_f2i64, src);
+ break;
+ case GLSL_TYPE_DOUBLE:
+ result = new(ctx) ir_expression(ir_unop_d2i64, src);
+ break;
+ case GLSL_TYPE_UINT64:
+ result = new(ctx) ir_expression(ir_unop_u642i64, src);
+ break;
+ }
+ break;
}
assert(result != NULL);