From 9602c7c02f854beee70c9e2713e39f04234bb558 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Samuel=20Iglesias=20Gons=C3=A1lvez?= Date: Tue, 8 Nov 2016 16:45:37 +0100 Subject: [PATCH] spirv: add definition of double based data types MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Iglesias Gonsálvez Reviewed-by: Jason Ekstrand --- 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 9dc93e20202..46e0c386eed 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -704,9 +704,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.30.2