<div dir="ltr"><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br><br></div>Given that you already have 27 non-trivial commits in mesa, I think now would be a good time to apply for commit access. :-)<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 7, 2017 at 2:52 AM, Alex Smith <span dir="ltr"><<a href="mailto:asmith@feralinteractive.com" target="_blank">asmith@feralinteractive.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Gather operations in both GLSL and SPIR-V require a sampler. Fixes<br>
gathers returning garbage when using separate texture/samplers (on AMD,<br>
was using an invalid sampler descriptor).<br>
<br>
Signed-off-by: Alex Smith <<a href="mailto:asmith@feralinteractive.com">asmith@feralinteractive.com</a>><br>
Cc: "17.2 17.3" <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.<wbr>freedesktop.org</a>><br>
---<br>
src/compiler/nir/nir.h | 1 -<br>
src/compiler/spirv/spirv_to_<wbr>nir.c | 2 +-<br>
2 files changed, 1 insertion(+), 2 deletions(-)<br>
<br>
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h<br>
index 0174c30504..9c804c62bd 100644<br>
--- a/src/compiler/nir/nir.h<br>
+++ b/src/compiler/nir/nir.h<br>
@@ -1214,7 +1214,6 @@ typedef struct {<br>
* - nir_texop_txf_ms<br>
* - nir_texop_txs<br>
* - nir_texop_lod<br>
- * - nir_texop_tg4<br>
* - nir_texop_query_levels<br>
* - nir_texop_texture_samples<br>
* - nir_texop_samples_identical<br>
diff --git a/src/compiler/spirv/spirv_to_<wbr>nir.c b/src/compiler/spirv/spirv_to_<wbr>nir.c<br>
index 93a515d731..027efab88d 100644<br>
--- a/src/compiler/spirv/spirv_to_<wbr>nir.c<br>
+++ b/src/compiler/spirv/spirv_to_<wbr>nir.c<br>
@@ -1755,6 +1755,7 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,<br>
case nir_texop_txb:<br>
case nir_texop_txl:<br>
case nir_texop_txd:<br>
+ case nir_texop_tg4:<br>
/* These operations require a sampler */<br>
instr->sampler = nir_deref_var_clone(sampler, instr);<br>
break;<br>
@@ -1762,7 +1763,6 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,<br>
case nir_texop_txf_ms:<br>
case nir_texop_txs:<br>
case nir_texop_lod:<br>
- case nir_texop_tg4:<br>
case nir_texop_query_levels:<br>
case nir_texop_texture_samples:<br>
case nir_texop_samples_identical:<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.13.6<br>
<br>
</font></span></blockquote></div><br></div>