From: Timothy Arceri Date: Wed, 28 Jun 2017 04:46:06 +0000 (+1000) Subject: mesa: add KHR_no_error support for glBindFragDataLocation*() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=87bc32166afc00dedd1e95b1e11ceef26a994fe0;p=mesa.git mesa: add KHR_no_error support for glBindFragDataLocation*() Reviewed-by: Samuel Pitoiset --- diff --git a/src/mapi/glapi/gen/ARB_blend_func_extended.xml b/src/mapi/glapi/gen/ARB_blend_func_extended.xml index 406140f7ddf..10d85a76621 100644 --- a/src/mapi/glapi/gen/ARB_blend_func_extended.xml +++ b/src/mapi/glapi/gen/ARB_blend_func_extended.xml @@ -8,7 +8,7 @@ - + diff --git a/src/mapi/glapi/gen/GL3x.xml b/src/mapi/glapi/gen/GL3x.xml index f488ba36aec..24490da7e32 100644 --- a/src/mapi/glapi/gen/GL3x.xml +++ b/src/mapi/glapi/gen/GL3x.xml @@ -200,7 +200,7 @@ - + diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index 6e373ef6411..f2bdcaab121 100644 --- a/src/mesa/main/shader_query.cpp +++ b/src/mesa/main/shader_query.cpp @@ -279,6 +279,21 @@ _mesa_BindFragDataLocation(GLuint program, GLuint colorNumber, _mesa_BindFragDataLocationIndexed(program, colorNumber, 0, name); } +void GLAPIENTRY +_mesa_BindFragDataLocation_no_error(GLuint program, GLuint colorNumber, + const GLchar *name) +{ + GET_CURRENT_CONTEXT(ctx); + + if (!name) + return; + + struct gl_shader_program *const shProg = + _mesa_lookup_shader_program(ctx, program); + + bind_frag_data_location(shProg, name, colorNumber, 0); +} + void GLAPIENTRY _mesa_BindFragDataLocationIndexed(GLuint program, GLuint colorNumber, GLuint index, const GLchar *name) @@ -316,6 +331,21 @@ _mesa_BindFragDataLocationIndexed(GLuint program, GLuint colorNumber, bind_frag_data_location(shProg, name, colorNumber, index); } +void GLAPIENTRY +_mesa_BindFragDataLocationIndexed_no_error(GLuint program, GLuint colorNumber, + GLuint index, const GLchar *name) +{ + GET_CURRENT_CONTEXT(ctx); + + if (!name) + return; + + struct gl_shader_program *const shProg = + _mesa_lookup_shader_program(ctx, program); + + bind_frag_data_location(shProg, name, colorNumber, index); +} + GLint GLAPIENTRY _mesa_GetFragDataIndex(GLuint program, const GLchar *name) { diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h index b2229f7ced6..b7ba7ab84a6 100644 --- a/src/mesa/main/shaderapi.h +++ b/src/mesa/main/shaderapi.h @@ -157,6 +157,14 @@ extern void GLAPIENTRY _mesa_BindFragDataLocationIndexed(GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +extern void GLAPIENTRY +_mesa_BindFragDataLocation_no_error(GLuint program, GLuint colorNumber, + const GLchar *name); + +extern void GLAPIENTRY +_mesa_BindFragDataLocationIndexed_no_error(GLuint program, GLuint colorNumber, + GLuint index, const GLchar *name); + extern void GLAPIENTRY _mesa_GetActiveAttrib(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);