From 6e087f96c9830da07a0c788d94d2af6112a4425e Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Thu, 19 May 2022 13:26:33 -0700 Subject: [PATCH] nir_lower_mediump: Drop assertion about not containing movs. A 1D texture operation may need to do a mov to turn a reference to a channel of an SSA value into a scalar value to be passed as the texture coordinate (since texture srcs can't do swizzles). Seen in amnesia-the-dark-descent/low/46.shader_test() for example, where a 1D texture is used to remap each of r,g,b from a previous texture result. Besides, the nir_op_is_vec() case will (perhaps surprisingly) look through a mov, anyway. Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir_lower_mediump.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/compiler/nir/nir_lower_mediump.c b/src/compiler/nir/nir_lower_mediump.c index 927b2692dc6..5c6f84ec9be 100644 --- a/src/compiler/nir/nir_lower_mediump.c +++ b/src/compiler/nir/nir_lower_mediump.c @@ -465,12 +465,6 @@ nir_fold_16bit_sampler_conversions(nir_shader *nir, nir_alu_type src_type = nir_tex_instr_src_type(tex, i); - if (src_alu->op == nir_op_mov) { - assert(!"The IR shouldn't contain any movs to make this pass" - " effective."); - continue; - } - /* Handle vector sources that are made of scalar instructions. */ if (nir_op_is_vec(src_alu->op)) { /* See if the vector is made of f16->f32 opcodes. */