From: Samuel Pitoiset Date: Wed, 19 Jul 2017 12:42:07 +0000 (+0200) Subject: mesa: add KHR_no_error support to glDetachShader() and glDetachObjectARB() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ffe8813b02590bcd00437fe5cdc1103273ac2920;p=mesa.git mesa: add KHR_no_error support to glDetachShader() and glDetachObjectARB() Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 53b234b2f96..3e2bdc1736e 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -5334,7 +5334,7 @@ - + @@ -7681,7 +7681,7 @@ - + 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. */ @@ -1507,6 +1514,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) { @@ -1515,6 +1530,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) { 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);