<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 | 11 +++++++++--<br>
 1 file changed, 9 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 5b16d50..c162964 100644<br>
--- a/src/compiler/spirv/spirv_to_<wbr>nir.c<br>
+++ b/src/compiler/spirv/spirv_to_<wbr>nir.c<br>
@@ -1003,10 +1003,17 @@ vtn_handle_constant(struct vtn_builder *b, SpvOp opcode,<br>
       break;<br>
    }<br>
<br>
-   case SpvOpConstant:<br>
+   case SpvOpConstant: {<br>
       assert(glsl_type_is_scalar(<wbr>val->const_type));<br>
-      val->constant->values[0].u32[<wbr>0] = w[3];<br>
+      int bit_size = glsl_get_bit_size(val->const_<wbr>type);<br>
+      if (bit_size == 64) {<br>
+         val->constant->values->u32[0] = w[3];<br>
+         val->constant->values->u32[1] = w[4];<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->u32[0] = w[3];<br>
+      }<br>
       break;<br>
+   }<br>
    case SpvOpSpecConstant:<br>
       assert(glsl_type_is_scalar(<wbr>val->const_type));<br>
       val->constant->values[0].u32[<wbr>0] = get_specialization(b, val, w[3]);<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>