<div dir="ltr">I still don't see anything to make nir_validate not fail out on you if it sees a read or a write to/from an IMAGE or SAMPLER.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 10, 2018 at 8:05 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">v2: fix assertion for bindless to non bindless assignments<br>
<br>
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 | 8 +++++++-<br>
1 file changed, 7 insertions(+), 1 deletion(-)<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..e592754d770 100644<br>
--- a/src/compiler/nir/nir_split_<wbr>var_copies.c<br>
+++ b/src/compiler/nir/nir_split_<wbr>var_copies.c<br>
@@ -222,8 +222,9 @@ split_var_copies_block(nir_<wbr>block *block, struct split_var_copies_state *state)<br>
nir_deref_var *src_head = intrinsic->variables[1];<br>
nir_deref *dest_tail = nir_deref_tail(&dest_head-><wbr>deref);<br>
nir_deref *src_tail = nir_deref_tail(&src_head-><wbr>deref);<br>
+ enum glsl_base_type base_type = glsl_get_base_type(src_tail-><wbr>type);<br>
<br>
- switch (glsl_get_base_type(src_tail-><wbr>type)) {<br>
+ switch (base_type) {<br>
case GLSL_TYPE_ARRAY:<br>
case GLSL_TYPE_STRUCT:<br>
split_var_copy_instr(<wbr>intrinsic, dest_head, src_head,<br>
@@ -241,6 +242,11 @@ 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>
+ glsl_get_base_type(src_head-><wbr>var->type) == base_type);<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>
</font></span></blockquote></div><br></div>