summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-07-19 14:42:07 +0200
committerSamuel Pitoiset <[email protected]>2017-07-31 13:53:40 +0200
commitffe8813b02590bcd00437fe5cdc1103273ac2920 (patch)
tree90a9b742320e2b5b93fb3ad3b5ff22f230d85349 /src/mesa/main
parent6b9087a45dc4c21bb296110770c3e2b8d98cdb49 (diff)
mesa: add KHR_no_error support to glDetachShader() and glDetachObjectARB()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/shaderapi.c23
-rw-r--r--src/mesa/main/shaderapi.h6
2 files changed, 29 insertions, 0 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 29e2ed75a5a..e690e4731fa 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -504,6 +504,13 @@ detach_shader_error(struct gl_context *ctx, GLuint program, GLuint shader)
}
+static void
+detach_shader_no_error(struct gl_context *ctx, GLuint program, GLuint shader)
+{
+ detach_shader(ctx, program, shader, true);
+}
+
+
/**
* Return list of shaders attached to shader program.
*/
@@ -1508,6 +1515,14 @@ _mesa_DeleteShader(GLuint name)
void GLAPIENTRY
+_mesa_DetachObjectARB_no_error(GLhandleARB program, GLhandleARB shader)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ detach_shader_no_error(ctx, program, shader);
+}
+
+
+void GLAPIENTRY
_mesa_DetachObjectARB(GLhandleARB program, GLhandleARB shader)
{
GET_CURRENT_CONTEXT(ctx);
@@ -1516,6 +1531,14 @@ _mesa_DetachObjectARB(GLhandleARB program, GLhandleARB shader)
void GLAPIENTRY
+_mesa_DetachShader_no_error(GLuint program, GLuint shader)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ detach_shader_no_error(ctx, program, shader);
+}
+
+
+void GLAPIENTRY
_mesa_DetachShader(GLuint program, GLuint shader)
{
GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
index ae53021d914..e4c3bd2e76e 100644
--- a/src/mesa/main/shaderapi.h
+++ b/src/mesa/main/shaderapi.h
@@ -95,6 +95,9 @@ _mesa_CreateShaderObjectARB(GLenum type);
extern void GLAPIENTRY
_mesa_DeleteObjectARB(GLhandleARB obj);
+void GLAPIENTRY
+_mesa_DetachObjectARB_no_error(GLhandleARB, GLhandleARB);
+
extern void GLAPIENTRY
_mesa_DetachObjectARB(GLhandleARB, GLhandleARB);
@@ -193,6 +196,9 @@ _mesa_DeleteProgram(GLuint program);
extern void GLAPIENTRY
_mesa_DeleteShader(GLuint shader);
+void GLAPIENTRY
+_mesa_DetachShader_no_error(GLuint program, GLuint shader);
+
extern void GLAPIENTRY
_mesa_DetachShader(GLuint program, GLuint shader);