From ffe8813b02590bcd00437fe5cdc1103273ac2920 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 19 Jul 2017 14:42:07 +0200 Subject: mesa: add KHR_no_error support to glDetachShader() and glDetachObjectARB() Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- src/mesa/main/shaderapi.c | 23 +++++++++++++++++++++++ src/mesa/main/shaderapi.h | 6 ++++++ 2 files changed, 29 insertions(+) (limited to 'src/mesa') 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); -- cgit v1.2.3