nir/lower_subgroups: add extra filter data to options

It might be convenient for filter implementations to have access to
extra information. This will be used, for example, by ir3 to access
compiler features.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
This commit is contained in:
Job Noorman
2024-11-29 17:09:16 +01:00
committed by Marge Bot
parent c789a0a3d3
commit 493f7b8084
2 changed files with 11 additions and 3 deletions
+4 -1
View File
@@ -6144,10 +6144,13 @@ bool nir_lower_atomics(nir_shader *shader, nir_instr_filter_cb filter);
typedef struct nir_lower_subgroups_options {
/* In addition to the boolean lowering options below, this optional callback
* will filter instructions for lowering if non-NULL. The data passed will be
* this options struct itself.
* filter_data.
*/
nir_instr_filter_cb filter;
/* Extra data passed to the filter. */
const void *filter_data;
/* In case the exact subgroup size is not known, subgroup_size should be
* set to 0. In that case, the maximum subgroup size will be calculated by
* ballot_components * ballot_bit_size.