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 <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16616>
This commit is contained in:
Emma Anholt 2022-05-19 13:26:33 -07:00 committed by Marge Bot
parent 5f64bc7a3e
commit 6e087f96c9
1 changed files with 0 additions and 6 deletions

View File

@ -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. */