[Mesa-dev] [PATCH 02/22] spirv: add definition of double based data types
Juan A. Suarez Romero
jasuarez at igalia.com
Fri Nov 25 08:52:32 UTC 2016
From: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
---
src/compiler/spirv/spirv_to_nir.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index c28d425..e5ec868 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -706,9 +706,11 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode,
val->type->type = (signedness ? glsl_int_type() : glsl_uint_type());
break;
}
- case SpvOpTypeFloat:
- val->type->type = glsl_float_type();
+ case SpvOpTypeFloat: {
+ int bit_size = w[2];
+ val->type->type = bit_size == 64 ? glsl_double_type() : glsl_float_type();
break;
+ }
case SpvOpTypeVector: {
struct vtn_type *base = vtn_value(b, w[2], vtn_value_type_type)->type;
--
2.7.4
More information about the mesa-dev
mailing list