summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Boll <andreas.boll.dev@gmail.com>2017-05-30 16:02:46 +0200
committerAndreas Boll <andreas.boll.dev@gmail.com>2017-05-30 16:02:46 +0200
commit7eebd2ab57bd5d0e8ceb2daaaff9a19414c93b4c (patch)
tree4043af98d0c12dfc7abed00d3e8b41743824a858
parent9ebf0e9fa1a160ad51f4516272e9a15ef2c3071a (diff)
XXX glsl: Handle result type intglsl_arb_gpu_shader_fp64
-rw-r--r--src/compiler/glsl/lower_64bit.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/compiler/glsl/lower_64bit.cpp b/src/compiler/glsl/lower_64bit.cpp
index f0c20be48b..282f087a14 100644
--- a/src/compiler/glsl/lower_64bit.cpp
+++ b/src/compiler/glsl/lower_64bit.cpp
@@ -263,7 +263,9 @@ lower_64bit::compact_destination(ir_factory &body,
? ir_unop_pack_uint_2x32 : ir_unop_pack_int_2x32;
fprintf(stderr, "compact_destination type: %s\n", type->name);
- if (type->base_type == GLSL_TYPE_BOOL || type->base_type == GLSL_TYPE_FLOAT) {
+ if (type->base_type == GLSL_TYPE_BOOL ||
+ type->base_type == GLSL_TYPE_FLOAT ||
+ type->base_type == GLSL_TYPE_INT) {
fprintf(stderr, "Pack operation: not required\n");
}
else {
@@ -275,7 +277,9 @@ lower_64bit::compact_destination(ir_factory &body,
body.make_temp(type, "compacted_64bit_result");
for (unsigned i = 0; i < type->vector_elements; i++) {
- if (type->base_type == GLSL_TYPE_BOOL || type->base_type == GLSL_TYPE_FLOAT) {
+ if (type->base_type == GLSL_TYPE_BOOL ||
+ type->base_type == GLSL_TYPE_FLOAT ||
+ type->base_type == GLSL_TYPE_INT) {
body.emit(assign(compacted_result,
result[i],
1U << i));
@@ -307,6 +311,8 @@ lower_64bit::lower_op_to_function_call(ir_instruction *base_ir,
? glsl_type::bool_type :
ir->type->base_type == GLSL_TYPE_FLOAT
? glsl_type::float_type :
+ ir->type->base_type == GLSL_TYPE_INT
+ ? glsl_type::int_type :
(ir->type->base_type == GLSL_TYPE_UINT64 ||
ir->type->base_type == GLSL_TYPE_DOUBLE)
? glsl_type::uvec2_type : glsl_type::ivec2_type;