ir3,turnip: Enable subgroup ops support in all stages on gen4
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13817>
This commit is contained in:
parent
ded51fd39e
commit
3dfd4230bb
|
@ -527,21 +527,24 @@ ir3_nir_post_finalize(struct ir3_compiler *compiler, nir_shader *s)
|
|||
NIR_PASS_V(s, nir_lower_mediump_io, nir_var_shader_out, 0, false);
|
||||
}
|
||||
|
||||
if ((s->info.stage == MESA_SHADER_COMPUTE) ||
|
||||
(s->info.stage == MESA_SHADER_KERNEL) ||
|
||||
compiler->has_getfiberid) {
|
||||
OPT(s, nir_lower_subgroups,
|
||||
&(nir_lower_subgroups_options){
|
||||
.subgroup_size = 128,
|
||||
.ballot_bit_size = 32,
|
||||
.ballot_components = 4,
|
||||
.lower_to_scalar = true,
|
||||
.lower_vote_eq = true,
|
||||
.lower_subgroup_masks = true,
|
||||
.lower_read_invocation_to_cond = true,
|
||||
});
|
||||
}
|
||||
|
||||
if ((s->info.stage == MESA_SHADER_COMPUTE) ||
|
||||
(s->info.stage == MESA_SHADER_KERNEL)) {
|
||||
bool progress = false;
|
||||
NIR_PASS(progress, s, nir_lower_subgroups,
|
||||
&(nir_lower_subgroups_options){
|
||||
.subgroup_size = 128,
|
||||
.ballot_bit_size = 32,
|
||||
.ballot_components = 4,
|
||||
.lower_to_scalar = true,
|
||||
.lower_vote_eq = true,
|
||||
.lower_subgroup_masks = true,
|
||||
.lower_read_invocation_to_cond = true,
|
||||
});
|
||||
|
||||
progress = false;
|
||||
NIR_PASS(progress, s, ir3_nir_lower_subgroup_id_cs);
|
||||
|
||||
/* ir3_nir_lower_subgroup_id_cs creates extra compute intrinsics which
|
||||
|
|
|
@ -807,6 +807,10 @@ tu_get_physical_device_properties_1_1(struct tu_physical_device *pdevice,
|
|||
p->subgroupSupportedOperations = VK_SUBGROUP_FEATURE_BASIC_BIT |
|
||||
VK_SUBGROUP_FEATURE_VOTE_BIT |
|
||||
VK_SUBGROUP_FEATURE_BALLOT_BIT;
|
||||
if (pdevice->info->a6xx.has_getfiberid) {
|
||||
p->subgroupSupportedStages |= VK_SHADER_STAGE_ALL_GRAPHICS;
|
||||
}
|
||||
|
||||
p->subgroupQuadOperationsInAllStages = false;
|
||||
|
||||
p->pointClippingBehavior = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES;
|
||||
|
|
Loading…
Reference in New Issue