From: Jason Ekstrand Date: Thu, 21 Jul 2016 02:23:17 +0000 (-0700) Subject: spirv/nir: Fix some texture opcode asserts X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2ddefd03b748024735c106b97b9acbdab6c93766;p=mesa.git 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 Reviewed-by: Kenneth Graunke Cc: "12.0" --- diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 1efda9ba85c..22cd2e73912 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);