mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 05:10:17 +01:00
st/mesa: properly encode OES_geometry_shader requirement
Since the extension was added, we grew a cap to expose the number of invocations. Use it to prevent geometry shaders from being spuriously exposed. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10569>
This commit is contained in:
parent
584799d6a3
commit
a5379ef4a7
1 changed files with 3 additions and 5 deletions
|
|
@ -1293,13 +1293,11 @@ void st_init_extensions(struct pipe_screen *screen,
|
|||
extensions->ARB_tessellation_shader = GL_TRUE;
|
||||
}
|
||||
|
||||
/* What this is really checking for is the ability to support multiple
|
||||
* invocations of a geometry shader. There is no separate cap for that, so
|
||||
* we check the GLSLVersion.
|
||||
*/
|
||||
/* OES_geometry_shader requires instancing */
|
||||
if ((GLSLVersion >= 400 || ESSLVersion >= 310) &&
|
||||
screen->get_shader_param(screen, PIPE_SHADER_GEOMETRY,
|
||||
PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) {
|
||||
PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0 &&
|
||||
consts->MaxGeometryShaderInvocations >= 32) {
|
||||
extensions->OES_geometry_shader = GL_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue