<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_quote"><br>On Wed, Mar 21, 2018 at 12:34 PM, 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>
v2: Use nir_imm_floatN_t for the constant.<br>
---<br>
 src/compiler/spirv/vtn_alu.c | 7 ++++---<br>
 1 file changed, 4 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/compiler/spirv/vtn_alu.c b/src/compiler/spirv/vtn_alu.c<br>
index 01be397e271..3226e5b8739 100644<br>
--- a/src/compiler/spirv/vtn_alu.c<br>
+++ b/src/compiler/spirv/vtn_alu.c<br>
@@ -563,10 +563,11 @@ 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 = nir_imm_floatN_t(&b->nb, INFINITY, src[0]->bit_size);<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></div>