Mesa (master): spirv/nir: Fix some texture opcode asserts

Jason Ekstrand jekstrand at kemper.freedesktop.org
Fri Jul 22 23:20:51 UTC 2016


Module: Mesa
Branch: master
Commit: 2ddefd03b748024735c106b97b9acbdab6c93766
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2ddefd03b748024735c106b97b9acbdab6c93766

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Wed Jul 20 19:23:17 2016 -0700

spirv/nir: Fix some texture opcode asserts

We can't get an lod with txf_ms and SPIR-V considers textureGrad to be an
explicit-LOD texturing instruction.

Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Cc: "12.0" <mesa-dev at lists.freedesktop.org>

---

 src/compiler/spirv/spirv_to_nir.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 1efda9b..22cd2e7 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -1444,12 +1444,12 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
 
       if (operands & SpvImageOperandsLodMask) {
          assert(texop == nir_texop_txl || texop == nir_texop_txf ||
-                texop == nir_texop_txf_ms || texop == nir_texop_txs);
+                texop == nir_texop_txs);
          (*p++) = vtn_tex_src(b, w[idx++], nir_tex_src_lod);
       }
 
       if (operands & SpvImageOperandsGradMask) {
-         assert(texop == nir_texop_tex);
+         assert(texop == nir_texop_txl);
          texop = nir_texop_txd;
          (*p++) = vtn_tex_src(b, w[idx++], nir_tex_src_ddx);
          (*p++) = vtn_tex_src(b, w[idx++], nir_tex_src_ddy);




More information about the mesa-commit mailing list