<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Feb 23, 2018 at 1:26 AM, Jose Maria Casanova Crespo <span dir="ltr"><<a href="mailto:jmcasanova@igalia.com" target="_blank">jmcasanova@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Range in 16-bit push constants load was being calculated<br>
wrongly using 4-bytes per element instead of 2-bytes as it<br>
should be.<br>
---<br>
 src/compiler/spirv/vtn_<wbr>variables.c | 4 ++++<br>
 1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/compiler/spirv/vtn_<wbr>variables.c b/src/compiler/spirv/vtn_<wbr>variables.c<br>
index 78adab3ed2..81658afbd9 100644<br>
--- a/src/compiler/spirv/vtn_<wbr>variables.c<br>
+++ b/src/compiler/spirv/vtn_<wbr>variables.c<br>
@@ -687,6 +687,10 @@ vtn_type_block_size(struct vtn_builder *b, struct vtn_type *type)<br>
                 base_type == GLSL_TYPE_UINT64 ||<br>
                 base_type == GLSL_TYPE_INT64) {<br>
          return glsl_get_vector_elements(type-<wbr>>type) * 8;<br>
+      } else if (base_type == GLSL_TYPE_FLOAT16 ||<br>
+                 base_type == GLSL_TYPE_UINT16 ||<br>
+                 base_type == GLSL_TYPE_INT16){<br>
+         return glsl_get_vector_elements(type-<wbr>>type) * 2;<br></blockquote><div><br></div><div>Let's just drop the whole if statement and use glsl_get_bit_size() instead.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
       } else {<br>
          return glsl_get_vector_elements(type-<wbr>>type) * 4;<br>
       }<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.14.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>