[Mesa-dev] [PATCH 03/22] spirv: add double support for loading DF constants
Juan A. Suarez Romero
jasuarez at igalia.com
Fri Nov 25 08:52:33 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 | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index e5ec868..dadf7fc 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -1005,10 +1005,17 @@ vtn_handle_constant(struct vtn_builder *b, SpvOp opcode,
break;
}
- case SpvOpConstant:
+ case SpvOpConstant: {
assert(glsl_type_is_scalar(val->const_type));
- val->constant->value.u[0] = w[3];
+ int bit_size = glsl_get_bit_size(val->const_type);
+ if (bit_size == 64) {
+ val->constant->value.u[0] = w[3];
+ val->constant->value.u[1] = w[4];
+ } else {
+ val->constant->value.u[0] = w[3];
+ }
break;
+ }
case SpvOpSpecConstant:
assert(glsl_type_is_scalar(val->const_type));
val->constant->value.u[0] = get_specialization(b, val, w[3]);
--
2.7.4
More information about the mesa-dev
mailing list