Mesa (main): st/mesa: properly encode OES_geometry_shader requirement
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Jun 6 21:34:15 UTC 2021
Module: Mesa
Branch: main
Commit: a5379ef4a7e32690e67f3ffca39da84d8d40979b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a5379ef4a7e32690e67f3ffca39da84d8d40979b
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Sat May 1 18:52:48 2021 -0400
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 at alum.mit.edu>
Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10569>
---
src/mesa/state_tracker/st_extensions.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 73cbb297c45..f0f03420aac 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -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;
}
More information about the mesa-commit
mailing list