intel/fs/xe2+: Don't lower barycentric load offsets to fixed-point format on Xe2+.

Floating-point offsets work fine in combination with the
floating-point arithmetic we're about to lower these intrinsics into,
and they require less instructions than converting to fixed-point and
then back.  No reason to take the precision/range hit nor the extra
instructions.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29847>
This commit is contained in:
Francisco Jerez
2022-08-10 17:33:40 -07:00
committed by Marge Bot
parent 04b5b8b9ec
commit e8007c9325
+4 -3
View File
@@ -618,9 +618,10 @@ brw_nir_lower_fs_inputs(nir_shader *nir,
NULL);
}
nir_shader_intrinsics_pass(nir, lower_barycentric_at_offset,
nir_metadata_control_flow,
NULL);
if (devinfo->ver < 20)
nir_shader_intrinsics_pass(nir, lower_barycentric_at_offset,
nir_metadata_control_flow,
NULL);
/* This pass needs actual constants */
nir_opt_constant_folding(nir);