<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Dec 16, 2016 at 6:48 AM, Juan A. Suarez Romero <span dir="ltr"><<a href="mailto:jasuarez@igalia.com" target="_blank">jasuarez@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Samuel Iglesias Gonsálvez <<a href="mailto:siglesias@igalia.com">siglesias@igalia.com</a>><br>
<br>
Signed-off-by: Samuel Iglesias Gonsálvez <<a href="mailto:siglesias@igalia.com">siglesias@igalia.com</a>><br>
---<br>
src/compiler/spirv/spirv_to_<wbr>nir.c | 12 ++++++++++--<br>
1 file changed, 10 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/compiler/spirv/spirv_to_<wbr>nir.c b/src/compiler/spirv/spirv_to_<wbr>nir.c<br>
index 5126dc9..60cc988 100644<br>
--- a/src/compiler/spirv/spirv_to_<wbr>nir.c<br>
+++ b/src/compiler/spirv/spirv_to_<wbr>nir.c<br>
@@ -1166,8 +1166,12 @@ vtn_handle_constant(struct vtn_builder *b, SpvOp opcode,<br>
val->constant = *c;<br>
} else {<br>
unsigned num_components = glsl_get_vector_elements(type)<wbr>;<br>
+ unsigned bit_size = glsl_get_bit_size(type);<br>
for (unsigned i = 0; i < num_components; i++)<br>
- val->constant->values[0].u32[<wbr>i] = (*c)->values[col].u32[elem + i];<br>
+ if (bit_size == 64)<br>
+ val->constant->values[0].u64[<wbr>i] = (*c)->values[col].u64[elem + i];<br>
+ else<br></blockquote><div><br></div><div>assert(bit_size == 32);<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ val->constant->values[0].u32[<wbr>i] = (*c)->values[col].u32[elem + i];<br>
}<br>
} else {<br>
struct vtn_value *insert =<br>
@@ -1177,8 +1181,12 @@ vtn_handle_constant(struct vtn_builder *b, SpvOp opcode,<br>
*c = insert->constant;<br>
} else {<br>
unsigned num_components = glsl_get_vector_elements(type)<wbr>;<br>
+ unsigned bit_size = glsl_get_bit_size(type);<br>
for (unsigned i = 0; i < num_components; i++)<br>
- (*c)->values[col].u32[elem + i] = insert->constant->values[0].<wbr>u32[i];<br>
+ if (bit_size == 64)<br>
+ (*c)->values[col].u64[elem + i] = insert->constant->values[0].<wbr>u64[i];<br>
+ else<br></blockquote><div><br></div><div>same here<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ (*c)->values[col].u32[elem + i] = insert->constant->values[0].<wbr>u32[i];<br>
}<br>
}<br>
break;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.9.3<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>