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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user