nir: Add a new subgroups lowering pass
This commit pulls nir_lower_read_invocations_to_scalar along with most of the guts of nir_opt_intrinsics (which mostly does subgroup lowering) into a new nir_lower_subgroups pass. There are various other bits of subgroup lowering that we're going to want to do so it makes a bit more sense to keep it all together in one pass. We also move it in i965 to happen after nir_lower_system_values to ensure that because we want to handle the subgroup mask system value intrinsics here. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
@@ -1835,9 +1835,6 @@ typedef struct nir_shader_compiler_options {
|
||||
bool lower_extract_byte;
|
||||
bool lower_extract_word;
|
||||
|
||||
bool lower_vote_trivial;
|
||||
bool lower_subgroup_masks;
|
||||
|
||||
/**
|
||||
* Does the driver support real 32-bit integers? (Otherwise, integers
|
||||
* are simulated by floats.)
|
||||
@@ -2479,6 +2476,15 @@ bool nir_lower_samplers(nir_shader *shader,
|
||||
bool nir_lower_samplers_as_deref(nir_shader *shader,
|
||||
const struct gl_shader_program *shader_program);
|
||||
|
||||
typedef struct nir_lower_subgroups_options {
|
||||
bool lower_to_scalar:1;
|
||||
bool lower_vote_trivial:1;
|
||||
bool lower_subgroup_masks:1;
|
||||
} nir_lower_subgroups_options;
|
||||
|
||||
bool nir_lower_subgroups(nir_shader *shader,
|
||||
const nir_lower_subgroups_options *options);
|
||||
|
||||
bool nir_lower_system_values(nir_shader *shader);
|
||||
|
||||
typedef struct nir_lower_tex_options {
|
||||
|
Reference in New Issue
Block a user