<div dir="ltr">Let's handle 16-bit while we're at it.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 8, 2018 at 8:07 AM, Neil Roberts <span dir="ltr"><<a href="mailto:nroberts@igalia.com" target="_blank">nroberts@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The only change neccessary is to change the type of the constant used<br>
to compare against.<br>
<br>
This has been tested against the arb_gpu_shader_fp64/execution/<br>
fs-isinf-dvec tests using the ARB_gl_spirv branch.<br>
---<br>
 src/compiler/spirv/vtn_alu.c | 11 ++++++++---<br>
 1 file changed, 8 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/compiler/spirv/vtn_alu.c b/src/compiler/spirv/vtn_alu.c<br>
index d0c9e316935..2b03a2e4d09 100644<br>
--- a/src/compiler/spirv/vtn_alu.c<br>
+++ b/src/compiler/spirv/vtn_alu.c<br>
@@ -529,10 +529,15 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode,<br>
       val->ssa->def = nir_fne(&b->nb, src[0], src[0]);<br>
       break;<br>
<br>
-   case SpvOpIsInf:<br>
-      val->ssa->def = nir_ieq(&b->nb, nir_fabs(&b->nb, src[0]),<br>
-                                      nir_imm_float(&b->nb, INFINITY));<br>
+   case SpvOpIsInf: {<br>
+      nir_ssa_def *inf;<br>
+      if (src[0]->bit_size == 64)<br>
+         inf = nir_imm_double(&b->nb, INFINITY);<br>
+      else<br>
+         inf = nir_imm_float(&b->nb, INFINITY);<br>
+      val->ssa->def = nir_ieq(&b->nb, nir_fabs(&b->nb, src[0]), inf);<br>
       break;<br>
+   }<br>
<br>
    case SpvOpFUnordEqual:<br>
    case SpvOpFUnordNotEqual:<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>