summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-07-20 19:23:17 -0700
committerJason Ekstrand <[email protected]>2016-07-22 16:27:35 -0700
commit2ddefd03b748024735c106b97b9acbdab6c93766 (patch)
tree191e5829e0bb1d49d61b28aa2f40a5bf1ec997e1 /src/compiler/spirv
parent3f5cf8c488bfc401d1d5503c1ec61874d7c1477d (diff)
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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
Diffstat (limited to 'src/compiler/spirv')
-rw-r--r--src/compiler/spirv/spirv_to_nir.c4
1 files changed, 2 insertions, 2 deletions
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);