mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 13:50:11 +01:00
v3d: expose GL_KHR_shader_subgroup for v71+
All the compiler support was implemented as part of the v3dv
implementation (see commit 31e8740808 and MR#27211).
We are using the same size/supported_stages and mostly the same
supported features, so probably at some point it would be good to have
a common place for that info. Zink reuses their definitions, but as
far as I see it does that because the PIPE and equivalent VK
definitions has the same values, that seems somewhat fragile.
We don't support all features, and in order to support arithmetic we
need to enable a lowering.
Using CTS, right now we are passing 1023 tests out of 6053 (the rest
are skipped).
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37621>
This commit is contained in:
parent
01d1748130
commit
cea6d7ada5
2 changed files with 14 additions and 0 deletions
|
|
@ -1876,6 +1876,7 @@ v3d_attempt_compile(struct v3d_compile *c)
|
||||||
.lower_subgroup_masks = true,
|
.lower_subgroup_masks = true,
|
||||||
.lower_relative_shuffle = true,
|
.lower_relative_shuffle = true,
|
||||||
.lower_quad = true,
|
.lower_quad = true,
|
||||||
|
.lower_reduce = true,
|
||||||
};
|
};
|
||||||
NIR_PASS(_, c->s, nir_lower_subgroups, &subgroup_opts);
|
NIR_PASS(_, c->s, nir_lower_subgroups, &subgroup_opts);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -391,6 +391,19 @@ v3d_init_screen_caps(struct v3d_screen *screen)
|
||||||
|
|
||||||
caps->device_reset_status_query = screen->devinfo.has_reset_counter;
|
caps->device_reset_status_query = screen->devinfo.has_reset_counter;
|
||||||
caps->robust_buffer_access_behavior = true;
|
caps->robust_buffer_access_behavior = true;
|
||||||
|
|
||||||
|
/* FIXME: same settings as v3dv, maybe put them in a common place. */
|
||||||
|
if (screen->devinfo.ver >= 71) {
|
||||||
|
caps->shader_subgroup_size = V3D_CHANNELS;
|
||||||
|
caps->shader_subgroup_supported_stages =
|
||||||
|
BITFIELD_BIT(MESA_SHADER_FRAGMENT) | BITFIELD_BIT(MESA_SHADER_COMPUTE);
|
||||||
|
caps->shader_subgroup_supported_features = PIPE_SHADER_SUBGROUP_FEATURE_BASIC |
|
||||||
|
PIPE_SHADER_SUBGROUP_FEATURE_BALLOT | PIPE_SHADER_SUBGROUP_FEATURE_SHUFFLE |
|
||||||
|
PIPE_SHADER_SUBGROUP_FEATURE_SHUFFLE_RELATIVE |
|
||||||
|
PIPE_SHADER_SUBGROUP_FEATURE_VOTE | PIPE_SHADER_SUBGROUP_FEATURE_ARITHMETIC |
|
||||||
|
PIPE_SHADER_SUBGROUP_FEATURE_QUAD;
|
||||||
|
caps->shader_subgroup_quad_all_stages = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue