<div dir="ltr">I have a very strong feeling that this isn't the only place where reading/writing IMAGE and SAMPLER variables is going to cause NIR heartburn.  For example, we have special cases in nir_validate for SUBROUTINE variables and we probably need IMAGE and SAMPLER support everywhere we have SUBROUTINE plus some (since you can write to them now as well).<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 3, 2018 at 6:21 AM, Karol Herbst <span dir="ltr"><<a href="mailto:kherbst@redhat.com" target="_blank">kherbst@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Karol Herbst <<a href="mailto:kherbst@redhat.com">kherbst@redhat.com</a>><br>
---<br>
 src/compiler/nir/nir_split_<wbr>var_copies.c | 4 ++++<br>
 1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/compiler/nir/nir_split_<wbr>var_copies.c b/src/compiler/nir/nir_split_<wbr>var_copies.c<br>
index bc3ceedbdb8..231a89add4d 100644<br>
--- a/src/compiler/nir/nir_split_<wbr>var_copies.c<br>
+++ b/src/compiler/nir/nir_split_<wbr>var_copies.c<br>
@@ -241,6 +241,10 @@ split_var_copies_block(nir_<wbr>block *block, struct split_var_copies_state *state)<br>
             ralloc_steal(state->dead_ctx, instr);<br>
          }<br>
          break;<br>
+      /* for bindless those are uint64 */<br>
+      case GLSL_TYPE_IMAGE:<br>
+      case GLSL_TYPE_SAMPLER:<br>
+         assert(src_head->var->data.<wbr>bindless);<br>
       case GLSL_TYPE_INT:<br>
       case GLSL_TYPE_UINT:<br>
       case GLSL_TYPE_INT16:<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>