mesa/src/amd/common/nir
Rhys Perry 614437ead5 ac/nir: don't vectorize 16-bit shared loads to 8-bit
Fixes an issue where a 2x16 load was vectorized with a 1x16 load into a
8x8 load. This became possible after 49d923078f increased
aligned_new_size from 6 bytes to 8 bytes.

fossil-db (navi31):
Totals from 5 (0.01% of 79825) affected shaders:
Instrs: 6994 -> 6257 (-10.54%)
CodeSize: 44000 -> 39464 (-10.31%)
Latency: 90482 -> 89795 (-0.76%)
InvThroughput: 202955 -> 201926 (-0.51%)
VClause: 560 -> 565 (+0.89%)
Copies: 1135 -> 1108 (-2.38%); split: -2.82%, +0.44%
PreVGPRs: 201 -> 199 (-1.00%)
VALU: 3882 -> 3201 (-17.54%)
SALU: 493 -> 479 (-2.84%)
VOPD: 262 -> 258 (-1.53%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 49d923078f ("ac/nir: fix calculation of aligned_new_size")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14500
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39156>
2026-01-06 10:28:02 +00:00
..
tests ac/gpu_info: add some more flags to ac_cu_info 2025-12-22 07:34:46 +00:00
ac_nir.c ac/nir: don't vectorize 16-bit shared loads to 8-bit 2026-01-06 10:28:02 +00:00
ac_nir.h ac/nir: Add pass to fixup SMEM on GFX6-7 2026-01-02 23:42:16 +00:00
ac_nir_create_gs_copy_shader.c ac/nir: set subgroup size for gs copy shader 2025-09-14 13:21:21 +00:00
ac_nir_cull.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
ac_nir_helpers.h ac/nir: remove pack_clip_cull_distances option 2025-07-12 10:28:21 +00:00
ac_nir_lower_esgs_io_to_mem.c ac/nir: mark all input loads as reorderable and speculatable (for LICM) 2025-07-24 06:31:16 +00:00
ac_nir_lower_global_access.c treewide: add & use parent instr helpers 2025-11-12 21:22:13 +00:00
ac_nir_lower_image_opcodes_cdna.c treewide: simplify nir_def_rewrite_uses_after 2025-08-01 15:34:24 +00:00
ac_nir_lower_intrinsics_to_args.c treewide: use nir_def_as_* 2025-08-01 15:34:24 +00:00
ac_nir_lower_legacy_gs.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
ac_nir_lower_legacy_vs.c ac/nir: remove pack_clip_cull_distances option 2025-07-12 10:28:21 +00:00
ac_nir_lower_mem_access_bit_sizes.c ac/nir: Add pass to fixup SMEM on GFX6-7 2026-01-02 23:42:16 +00:00
ac_nir_lower_ngg.c ac/nir/cull: do not reuse variables if subgroup ops are used 2025-12-29 18:38:29 +00:00
ac_nir_lower_ngg_gs.c ac/nir/ngg: Use align() instead of ALIGN() 2025-11-12 13:40:55 +00:00
ac_nir_lower_ngg_mesh.c ac/lower_ngg_mesh: fix a segfault accessing out_variables out of bounds 2026-01-05 22:23:42 +00:00
ac_nir_lower_ps_early.c ac,radeonsi: move lowering to load_color0/1 to ac_nir_lower_ps_early 2026-01-01 18:30:29 +00:00
ac_nir_lower_ps_late.c ac/nir/lower_ps_late: remove gfx6 mrtz writemask workaround 2025-12-12 17:00:51 +00:00
ac_nir_lower_resinfo.c amd: lower get_ssbo_size in ac_nir_lower_resinfo 2025-11-02 01:42:07 +00:00
ac_nir_lower_sin_cos.c
ac_nir_lower_taskmesh_io_to_mem.c ac/nir/lower_taskmesh_io_to_mem: Use AC_TASK_DRAW_ENTRY_BYTES 2025-12-22 15:17:59 +00:00
ac_nir_lower_tess_io_to_mem.c nir: remove nir_io_add_const_offset_to_base 2025-11-29 00:16:38 +00:00
ac_nir_lower_tex.c treewide: add & use parent instr helpers 2025-11-12 21:22:13 +00:00
ac_nir_meta.h amd: constify struct radeon_surf 2025-10-29 12:50:44 +00:00
ac_nir_meta_cs_blit.c ac/nir/meta: allow compute blits with R5G6B5 & R5G5B5A1 formats on GFX9+ 2025-08-07 18:12:52 +00:00
ac_nir_meta_cs_clear_copy_buffer.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
ac_nir_meta_ps_resolve.c treewide: use nir_def_as_* 2025-08-01 15:34:24 +00:00
ac_nir_opt_outputs.c treewide: add & use parent instr helpers 2025-11-12 21:22:13 +00:00
ac_nir_opt_pack_half.c
ac_nir_opt_shared_append.c
ac_nir_prerast_utils.c ac/nir: rename ac_nir_get_lds_gs_out_slot_offset -> ac_nir_get_gs_out_lds_offset 2025-07-12 10:28:21 +00:00
ac_nir_surface.c ac/nir: Move surface related NIR functions to separate file. 2025-02-12 22:33:07 +01:00
ac_nir_surface.h ac/nir: Move surface related NIR functions to separate file. 2025-02-12 22:33:07 +01:00