nir/lower_subgroups: add lower_fp64 option
This is needed for doubles lowering to do the right thing. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Marek Olšák <maraeo@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36649>
This commit is contained in:
committed by
Marge Bot
parent
8f88991024
commit
1af0897452
@@ -5460,6 +5460,7 @@ typedef struct nir_lower_subgroups_options {
|
||||
uint8_t ballot_bit_size;
|
||||
uint8_t ballot_components;
|
||||
bool lower_to_scalar : 1;
|
||||
bool lower_fp64 : 1;
|
||||
bool lower_vote_trivial : 1;
|
||||
bool lower_vote_feq : 1;
|
||||
bool lower_vote_ieq : 1;
|
||||
|
||||
@@ -1036,7 +1036,8 @@ lower_subgroups_instr(nir_builder *b, nir_instr *instr, void *_options)
|
||||
return lower_vote_eq(b, intrin);
|
||||
} else {
|
||||
if (intrin->intrinsic == nir_intrinsic_vote_feq &&
|
||||
options->lower_vote_feq)
|
||||
(options->lower_vote_feq ||
|
||||
(options->lower_fp64 && intrin->src[0].ssa->bit_size == 64)))
|
||||
return lower_vote_eq(b, intrin);
|
||||
if (intrin->intrinsic == nir_intrinsic_vote_ieq &&
|
||||
options->lower_vote_ieq)
|
||||
@@ -1295,7 +1296,8 @@ lower_subgroups_instr(nir_builder *b, nir_instr *instr, void *_options)
|
||||
if (intrin->def.bit_size == 1 && options->ballot_components == 1 &&
|
||||
(options->lower_boolean_reduce || options->lower_reduce))
|
||||
return lower_boolean_reduce(b, intrin, options);
|
||||
if (options->lower_reduce)
|
||||
if (options->lower_reduce ||
|
||||
(options->lower_fp64 && intrin->def.bit_size == 64))
|
||||
return lower_scan_reduce(b, intrin, options);
|
||||
return ret;
|
||||
}
|
||||
@@ -1306,7 +1308,8 @@ lower_subgroups_instr(nir_builder *b, nir_instr *instr, void *_options)
|
||||
if (intrin->def.bit_size == 1 && options->ballot_components == 1 &&
|
||||
(options->lower_boolean_reduce || options->lower_reduce))
|
||||
return lower_boolean_reduce(b, intrin, options);
|
||||
if (options->lower_reduce)
|
||||
if (options->lower_reduce ||
|
||||
(options->lower_fp64 && intrin->def.bit_size == 64))
|
||||
return lower_scan_reduce(b, intrin, options);
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user