Mesa (staging/21.2): mesa: don't return errors for gl_* GetFragData* queries
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Aug 19 18:16:10 UTC 2021
Module: Mesa
Branch: staging/21.2
Commit: 1a3180d595f6d7541d3931fd63e12cbaec7fe7e7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1a3180d595f6d7541d3931fd63e12cbaec7fe7e7
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Wed Aug 11 22:26:07 2021 -0400
mesa: don't return errors for gl_* GetFragData* queries
There is nothing in the spec about this. BindFragDataLocation* is
supposed to return an error, but not Get.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5221
Fixes: 59012c3133 ("mesa: Implement glGetFragDataLocation")
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12333>
(cherry picked from commit bce19b3a779fd3526ef6368bc2fb180da23ba53e)
---
.pick_status.json | 2 +-
src/mesa/main/shader_query.cpp | 12 ------------
2 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 9ca043ea562..bee053bbbca 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -247,7 +247,7 @@
"description": "mesa: don't return errors for gl_* GetFragData* queries",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "59012c31337f104aedfe69ca6d3cf784581df544"
},
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
index 8c44d3eaeba..00f9d423670 100644
--- a/src/mesa/main/shader_query.cpp
+++ b/src/mesa/main/shader_query.cpp
@@ -409,12 +409,6 @@ _mesa_GetFragDataIndex(GLuint program, const GLchar *name)
if (!name)
return -1;
- if (strncmp(name, "gl_", 3) == 0) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetFragDataIndex(illegal name)");
- return -1;
- }
-
/* Not having a fragment shader is not an error.
*/
if (shProg->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL)
@@ -444,12 +438,6 @@ _mesa_GetFragDataLocation(GLuint program, const GLchar *name)
if (!name)
return -1;
- if (strncmp(name, "gl_", 3) == 0) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetFragDataLocation(illegal name)");
- return -1;
- }
-
/* Not having a fragment shader is not an error.
*/
if (shProg->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL)
More information about the mesa-commit
mailing list