From 1722c2498ff8c403c1f47a31f0ee2a036310b59b Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 20 Jul 2017 11:41:31 +0200 Subject: mesa: add KHR_no_error support to glLinkProgram() Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- src/mesa/main/shaderapi.c | 18 ++++++++++++++++++ src/mesa/main/shaderapi.h | 3 +++ 2 files changed, 21 insertions(+) (limited to 'src/mesa/main') diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 1c564d31704..6dd617be7e5 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1242,6 +1242,13 @@ link_program_error(struct gl_context *ctx, struct gl_shader_program *shProg) } +static void +link_program_no_error(struct gl_context *ctx, struct gl_shader_program *shProg) +{ + link_program(ctx, shProg, true); +} + + void _mesa_link_program(struct gl_context *ctx, struct gl_shader_program *shProg) { @@ -1702,6 +1709,17 @@ _mesa_IsShader(GLuint name) } +void GLAPIENTRY +_mesa_LinkProgram_no_error(GLuint programObj) +{ + GET_CURRENT_CONTEXT(ctx); + + struct gl_shader_program *shProg = + _mesa_lookup_shader_program(ctx, programObj); + link_program_no_error(ctx, shProg); +} + + void GLAPIENTRY _mesa_LinkProgram(GLuint programObj) { diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h index b76e57ee39d..7915248e391 100644 --- a/src/mesa/main/shaderapi.h +++ b/src/mesa/main/shaderapi.h @@ -131,6 +131,9 @@ _mesa_IsProgram(GLuint name); extern GLboolean GLAPIENTRY _mesa_IsShader(GLuint name); +void GLAPIENTRY +_mesa_LinkProgram_no_error(GLuint programObj); + extern void GLAPIENTRY _mesa_LinkProgram(GLuint programObj); -- cgit v1.2.3