mesa/src/amd/vulkan/nir
Georg Lehmann 17e597093d radv: eliminate unused FS output channels
For formats that don't have all color channels, there is no reason to
output all of them.
Games often write to R only or RGB formats with non trivial remaining channels.

Foz-DB Navi21:
Totals from 10270 (10.55% of 97347) affected shaders:
MaxWaves: 249166 -> 250950 (+0.72%); split: +0.73%, -0.01%
Instrs: 8442016 -> 8354715 (-1.03%); split: -1.05%, +0.01%
CodeSize: 45939644 -> 45487156 (-0.98%); split: -1.01%, +0.02%
VGPRs: 472584 -> 463784 (-1.86%); split: -1.98%, +0.12%
SpillSGPRs: 1502 -> 1448 (-3.60%)
LDS: 6024192 -> 6011904 (-0.20%)
Inputs: 42463 -> 41773 (-1.62%)
Outputs: 24601 -> 23955 (-2.63%)
Latency: 78011745 -> 77653907 (-0.46%); split: -0.56%, +0.10%
InvThroughput: 19767826 -> 19274046 (-2.50%); split: -2.53%, +0.03%
VClause: 177891 -> 176681 (-0.68%); split: -0.80%, +0.12%
SClause: 236784 -> 235324 (-0.62%); split: -0.72%, +0.10%
Copies: 621048 -> 616096 (-0.80%); split: -1.03%, +0.23%
Branches: 202608 -> 201811 (-0.39%); split: -0.44%, +0.05%
PreSGPRs: 441032 -> 437698 (-0.76%); split: -0.77%, +0.01%
PreVGPRs: 378067 -> 369564 (-2.25%); split: -2.26%, +0.01%
VALU: 5906415 -> 5833179 (-1.24%); split: -1.25%, +0.01%
SALU: 973428 -> 968088 (-0.55%); split: -0.61%, +0.06%
VMEM: 298277 -> 296504 (-0.59%); split: -0.61%, +0.01%
SMEM: 402244 -> 399612 (-0.65%); split: -0.71%, +0.06%

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38853>
2025-12-12 17:00:51 +00:00
..
radv_meta_nir.c radv/meta: fuse depth/stencil aspects copy with the GFX path 2025-11-12 07:35:33 +00:00
radv_meta_nir.h radv/meta: fuse depth/stencil aspects copy with the GFX path 2025-11-12 07:35:33 +00:00
radv_nir.h radv: eliminate unused FS output channels 2025-12-12 17:00:51 +00:00
radv_nir_apply_pipeline_layout.c amd: lower get_ssbo_size in ac_nir_lower_resinfo 2025-11-02 01:42:07 +00:00
radv_nir_export_multiview.c treewide: use VARYING_BIT_* 2025-07-04 19:01:04 +00:00
radv_nir_lower_abi.c radv: consistently use the value in bytes for esgs_itemsize 2025-11-20 16:45:37 +00:00
radv_nir_lower_cooperative_matrix.c radv: add support for cooperative matrix per element operations. 2025-11-22 13:16:20 +10:00
radv_nir_lower_fs_barycentric.c radv: rename rast_prim to vgt_outprim_type everywhere 2025-08-25 12:17:38 +00:00
radv_nir_lower_fs_intrinsics.c treewide: simplify nir_def_rewrite_uses_after 2025-08-01 15:34:24 +00:00
radv_nir_lower_hit_attrib_derefs.c nir: rename nir_lower_indirect_derefs -> nir_lower_indirect_derefs_to_if_else_trees 2025-11-20 05:42:11 +00:00
radv_nir_lower_immediate_samplers.c radv: lower embedded/immutable samplers earlier 2025-10-07 09:25:28 +00:00
radv_nir_lower_intrinsics_early.c radv: re-run clang-format 2025-07-16 09:10:33 +02:00
radv_nir_lower_io.c nir: remove nir_io_add_const_offset_to_base 2025-11-29 00:16:38 +00:00
radv_nir_lower_primitive_shading_rate.c treewide: Switch to nir_progress 2025-02-26 15:19:53 +00:00
radv_nir_lower_printf.c radv/nir: Use fmt_idx correctly 2025-12-11 16:26:01 +00:00
radv_nir_lower_ray_queries.c treewide: use nir_load_global alias of nir_build_load_global 2025-10-21 12:37:58 +02:00
radv_nir_lower_view_index.c radv/nir_lower_view_index: intrinsic pass 2025-02-24 20:19:10 +00:00
radv_nir_lower_viewport_to_zero.c radv/nir_lower_viewport_to_zero: intrinsic pass 2025-02-24 20:19:10 +00:00
radv_nir_lower_vs_inputs.c radv: fix load_smem alignment 2025-09-19 21:08:25 -04:00
radv_nir_opt_fs_builtins.c radv: optimize known front_face_fsign too 2025-12-12 08:24:38 +00:00
radv_nir_opt_tid_function.c treewide: add & use parent instr helpers 2025-11-12 21:22:13 +00:00
radv_nir_remap_color_attachment.c radv/nir: fix radv_nir_remap_color_attachment progress 2025-12-12 17:00:51 +00:00
radv_nir_rt_common.c docs: update/fix vk spec urls 2025-10-22 09:23:34 +02:00
radv_nir_rt_common.h radv: Store parent node IDs inside nodes on GFX12 2025-08-15 13:00:32 +00:00
radv_nir_rt_stage_common.c radv/rt: Refactor and split radv_nir_rt_shader.c 2025-12-08 18:29:49 +00:00
radv_nir_rt_stage_common.h radv/rt: Refactor and split radv_nir_rt_shader.c 2025-12-08 18:29:49 +00:00
radv_nir_rt_stage_cps.c radv/rt: Refactor and split radv_nir_rt_shader.c 2025-12-08 18:29:49 +00:00
radv_nir_rt_stage_cps.h radv/rt: Refactor and split radv_nir_rt_shader.c 2025-12-08 18:29:49 +00:00
radv_nir_rt_stage_monolithic.c radv/rt: Refactor and split radv_nir_rt_shader.c 2025-12-08 18:29:49 +00:00
radv_nir_rt_stage_monolithic.h radv/rt: Refactor and split radv_nir_rt_shader.c 2025-12-08 18:29:49 +00:00
radv_nir_rt_traversal_shader.c radv/rt: Use traversal vars for object origin/direction in ahit/isec 2025-12-08 18:29:49 +00:00
radv_nir_rt_traversal_shader.h radv/rt: Refactor and split radv_nir_rt_shader.c 2025-12-08 18:29:49 +00:00
radv_nir_trim_fs_color_exports.c radv: eliminate unused FS output channels 2025-12-12 17:00:51 +00:00