mesa/src/freedreno/ir3
Connor Abbott 4282386311 nir/spirv: Add inverse_ballot intrinsic
This is actually a no-op on AMD, so we really don't want to lower it to
something more complicated.  There may be a more efficient way to do
this on Intel too. In addition, in the future we'll want to use this for
lowering boolean reduce operations, where the inverse ballot will
operate on the backend's "natural" ballot type as indicated by
options->ballot_bit_size, instead of uvec4 as produced by SPIR-V. In
total, there are now three possible lowerings we may have to perform:

- inverse_ballot with source type of uvec4 from SPIR-V to inverse_ballot
with natural source type, when the backend supports inverse_ballot
natively.
- inverse_ballot with source type of uvec4 from SPIR-V to arithmetic,
when the backend doesn't support inverse_ballot.
- inverse_ballot with natural source type from reduce operation, when
the backend doesn't support inverse_ballot.

Previously we just did the second lowering unconditionally in vtn, but
it's just a combination of the first and third. We add support here for
the first and third lowerings in nir_lower_subgroups, instead of simply
moving the second lowering, to avoid unnecessary churn.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25123>
2023-09-20 14:41:18 +00:00
..
tests ir3/a7xx: Add ccinv instruction 2023-09-05 16:19:30 +00:00
.dir-locals.el ir3: Update .editorconfig and .dir-locals.el 2021-07-12 20:57:21 +00:00
.editorconfig ir3: Update .editorconfig and .dir-locals.el 2021-07-12 20:57:21 +00:00
disasm-a3xx.c isaspec: Rename isa_decode() to isa_disasm() 2023-07-28 18:41:58 +00:00
instr-a3xx.h ir3/a7xx: Add ccinv instruction 2023-09-05 16:19:30 +00:00
ir3.c freedreno, tu, ir3: Add last_helper statistic 2023-08-10 10:09:28 +00:00
ir3.h ir3/a7xx: Add ccinv instruction 2023-09-05 16:19:30 +00:00
ir3_a4xx.c freedreno,ir3: Don't call fd_dev_64b more than necessary 2023-06-23 10:31:07 +00:00
ir3_a6xx.c ir3/a7xx: Don't multiply global mem instruction's offset by 4 2023-09-05 16:19:29 +00:00
ir3_array_to_ssa.c ir3: Reformat source with clang-format 2021-07-12 20:57:21 +00:00
ir3_assembler.c ir3: Remove ir3_shader_variant::shader 2022-05-13 17:07:05 +00:00
ir3_assembler.h freedreno/replay: Add "print" instr to ir3 asm to be used in replay 2023-09-13 22:20:13 +00:00
ir3_cf.c ir3: prohibit folding of half->full conversion into mul.s24/u24 2021-08-20 11:46:14 +00:00
ir3_compiler.c ir3/a7xx: Disable shared consts for a7xx 2023-09-05 16:19:30 +00:00
ir3_compiler.h freedreno, ir3, tu: Constify various uses of ir3_shader_variant 2023-09-11 10:34:10 +00:00
ir3_compiler_nir.c tu, freedreno/a6xx: Don't use VS for PrimID passthru state 2023-09-11 10:34:10 +00:00
ir3_context.c nir: Drop nir_dest 2023-08-14 21:22:53 +00:00
ir3_context.h ir3: Do not reference nir_dest 2023-08-14 21:22:52 +00:00
ir3_cp.c Change all debug_assert calls to assert 2022-07-10 00:50:35 +00:00
ir3_cse.c util: normalize include files under src/util/*.h with util/ prefix in mesa code base 2022-11-10 06:27:25 +00:00
ir3_dce.c ir3/a7xx: insert lock/unlock at the end of every compute shader 2023-09-05 16:19:29 +00:00
ir3_delay.c ir3: Use (ss) for instructions writing shared regs 2022-01-07 14:26:08 +00:00
ir3_disk_cache.c freedreno, ir3, tu: Constify various uses of ir3_shader_variant 2023-09-11 10:34:10 +00:00
ir3_dominance.c util: normalize include files under src/util/*.h with util/ prefix in mesa code base 2022-11-10 06:27:25 +00:00
ir3_image.c nir: Drop nir_dest 2023-08-14 21:22:53 +00:00
ir3_image.h ir3: Reformat source with clang-format 2021-07-12 20:57:21 +00:00
ir3_legalize.c ir3: Implement helper invocation optimization 2023-08-10 10:09:28 +00:00
ir3_legalize_relative.c ir3: set UL flag before ir3_lower_subgroups 2022-07-27 17:08:03 +00:00
ir3_lexer.l freedreno/replay: Add "print" instr to ir3 asm to be used in replay 2023-09-13 22:20:13 +00:00
ir3_liveness.c util: normalize include files under src/util/*.h with util/ prefix in mesa code base 2022-11-10 06:27:25 +00:00
ir3_lower_parallelcopy.c ir3: Add ir3_shader_variant::compiler 2022-05-13 17:07:05 +00:00
ir3_lower_spill.c ir3/lower_spill: Fix corner case with oob offsets 2022-03-15 21:36:38 +00:00
ir3_lower_subgroups.c ir3: Add support for subgroup arithmetic 2022-03-10 17:15:29 +00:00
ir3_merge_regs.c util: normalize include files under src/util/*.h with util/ prefix in mesa code base 2022-11-10 06:27:25 +00:00
ir3_nir.c nir/spirv: Add inverse_ballot intrinsic 2023-09-20 14:41:18 +00:00
ir3_nir.h nir: Drop "SSA" from NIR language 2023-08-12 16:44:41 -04:00
ir3_nir_analyze_ubo_ranges.c treewide: Drop nir_ssa_for_src users 2023-09-18 10:25:17 -04:00
ir3_nir_imul.py python: drop python2 support 2021-08-14 21:44:32 +00:00
ir3_nir_lower_64b.c treewide: Remove remaining nir_ssa_for_src 2023-09-18 10:25:17 -04:00
ir3_nir_lower_io_offsets.c nir: Drop most uses if nir_instr_rewrite_src() 2023-08-18 01:00:15 +00:00
ir3_nir_lower_layer_id.c nir: Drop nir_dest 2023-08-14 21:22:53 +00:00
ir3_nir_lower_load_barycentric_at_offset.c nir: Drop "SSA" from NIR language 2023-08-12 16:44:41 -04:00
ir3_nir_lower_load_barycentric_at_sample.c nir: Drop "SSA" from NIR language 2023-08-12 16:44:41 -04:00
ir3_nir_lower_tess.c treewide: Use nir_before/after_impl in easy cases 2023-08-30 19:30:58 +00:00
ir3_nir_lower_tex_prefetch.c ir3/lower_tex_prefetch: Fix crash with lowered load_barycentric_at_offset 2023-09-07 16:12:58 +00:00
ir3_nir_lower_wide_load_store.c treewide: Drop nir_ssa_for_src users 2023-09-18 10:25:17 -04:00
ir3_nir_move_varying_inputs.c nir: Rename nir_instr_type_ssa_undef to nir_instr_type_undef 2023-08-15 17:44:27 +00:00
ir3_nir_opt_preamble.c treewide: Use nir_before/after_impl in easy cases 2023-08-30 19:30:58 +00:00
ir3_nir_trig.py ir3: Make trig replacement expression exact 2021-09-17 15:45:29 +00:00
ir3_parser.y freedreno/replay: Add "print" instr to ir3 asm to be used in replay 2023-09-13 22:20:13 +00:00
ir3_postsched.c freedreno/ir3: Validate our scheduling DAGs after construction. 2022-09-29 23:40:18 +00:00
ir3_print.c ir3: Implement and document ldc.k 2022-03-17 12:15:45 +00:00
ir3_ra.c ir3/ra: Make sure we don't pick a preferred reg overflowing the file. 2022-11-10 19:37:50 +00:00
ir3_ra.h ir3/ra: Fix ra_foreach_dst_n 2022-03-10 17:15:29 +00:00
ir3_ra_validate.c ir3: Reformat source with clang-format 2021-07-12 20:57:21 +00:00
ir3_remove_unreachable.c util/list: rename LIST_ENTRY() to list_entry() 2022-07-28 10:10:44 +00:00
ir3_sched.c freedreno/ir3: Validate our scheduling DAGs after construction. 2022-09-29 23:40:18 +00:00
ir3_shader.c freedreno, ir3, tu: Constify various uses of ir3_shader_variant 2023-09-11 10:34:10 +00:00
ir3_shader.h ir3+tu: Simplify ir3_find_sysval_regid callers 2023-09-11 19:45:18 +00:00
ir3_spill.c treewide: spelling fixes 2023-06-23 12:20:59 +00:00
ir3_validate.c ir3/a7xx: Add STSC definition 2023-04-27 21:06:47 +00:00
meson.build freedreno: decouple compiler and vulkan driver from gallium 2023-08-03 07:29:36 +00:00