Module: Mesa Branch: main Commit: 48674a179985d05e91a1c7ca5783058ae9d113b1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=48674a179985d05e91a1c7ca5783058ae9d113b1
Author: Rhys Perry <[email protected]> Date: Tue Jun 13 12:35:34 2023 +0100 nir/peephole_select: allow some invocation broadcast intrinsics fossil-db (navi21): Totals from 3 (0.00% of 133428) affected shaders: Instrs: 2074 -> 2083 (+0.43%) CodeSize: 10596 -> 10692 (+0.91%) Latency: 75754 -> 75946 (+0.25%) InvThroughput: 16900 -> 16975 (+0.44%) Copies: 312 -> 309 (-0.96%) Branches: 150 -> 132 (-12.00%) Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Georg Lehmann <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23621> --- src/compiler/nir/nir_opt_peephole_select.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/compiler/nir/nir_opt_peephole_select.c b/src/compiler/nir/nir_opt_peephole_select.c index 9e64f02c23b..b6acee478f1 100644 --- a/src/compiler/nir/nir_opt_peephole_select.c +++ b/src/compiler/nir/nir_opt_peephole_select.c @@ -143,6 +143,14 @@ block_check_for_allowed_instrs(nir_block *block, unsigned *count, case nir_intrinsic_load_frag_shading_rate: case nir_intrinsic_is_sparse_texels_resident: case nir_intrinsic_sparse_residency_code_and: + case nir_intrinsic_read_invocation: + case nir_intrinsic_quad_broadcast: + case nir_intrinsic_quad_swap_horizontal: + case nir_intrinsic_quad_swap_vertical: + case nir_intrinsic_quad_swap_diagonal: + case nir_intrinsic_quad_swizzle_amd: + case nir_intrinsic_masked_swizzle_amd: + case nir_intrinsic_lane_permute_16_amd: if (!alu_ok) return false; break;
