gallium/ntt: Stop lowering integer source mods.

While tgsi_exec.c (softpipe) implemented 32b integer src mods, the
tgsi.rst documentation says only 32b negate is supported and not abs.
llvmpipe implemented 32 and 64 negate but not abs, virgl implemented
negate incorrectly, and r600 apparently doesn't do any integer src mods.
glsl_to_tgsi has apparently never generated integer src mods.

Given that r600 can't do any integer src mods, just stop trying to
generate them for TGSI.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8369>
This commit is contained in:
Eric Anholt 2021-01-07 10:04:03 -08:00 committed by Marge Bot
parent ecaa7c3e39
commit 1ff2c01741

View file

@ -2628,9 +2628,11 @@ nir_to_tgsi(struct nir_shader *s,
NIR_PASS_V(s, nir_lower_bool_to_float);
}
NIR_PASS_V(s, nir_lower_to_source_mods,
nir_lower_float_source_mods |
nir_lower_int_source_mods); /* no doubles */
/* Only lower 32-bit floats. The only other modifier type officially
* supported by TGSI is 32-bit integer negates, but even those are broken on
* virglrenderer, so skip lowering all integer and f64 float mods.
*/
NIR_PASS_V(s, nir_lower_to_source_mods, nir_lower_float_source_mods);
NIR_PASS_V(s, nir_convert_from_ssa, true);
NIR_PASS_V(s, nir_lower_vec_to_movs, NULL, NULL);