[Mesa-dev] [PATCH 088/101] mesa: add KHR_no_error support to glShaderSource()

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Jul 21 17:40:37 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/mapi/glapi/gen/gl_API.xml | 2 +-
 src/mesa/main/shaderapi.c     | 9 +++++++++
 src/mesa/main/shaderapi.h     | 4 ++++
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index e1b3c43fb1..7afcc5db65 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -5497,7 +5497,7 @@
         <glx ignore="true"/>
     </function>
 
-    <function name="ShaderSource" es2="2.0" marshal="custom">
+    <function name="ShaderSource" es2="2.0" marshal="custom" no_error="true">
         <param name="shader" type="GLuint"/>
         <param name="count" type="GLsizei"/>
         <param name="string" type="const GLchar * const *"/>
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 941419b6f1..5539813182 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -1904,6 +1904,15 @@ shader_source(struct gl_context *ctx, GLuint shaderObj, GLsizei count,
 
 
 void GLAPIENTRY
+_mesa_ShaderSource_no_error(GLuint shaderObj, GLsizei count,
+                            const GLchar *const *string, const GLint *length)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   shader_source(ctx, shaderObj, count, string, length, true);
+}
+
+
+void GLAPIENTRY
 _mesa_ShaderSource(GLuint shaderObj, GLsizei count,
                    const GLchar *const *string, const GLint *length)
 {
diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
index e4c3bd2e76..b76e57ee39 100644
--- a/src/mesa/main/shaderapi.h
+++ b/src/mesa/main/shaderapi.h
@@ -134,6 +134,10 @@ _mesa_IsShader(GLuint name);
 extern void GLAPIENTRY
 _mesa_LinkProgram(GLuint programObj);
 
+void GLAPIENTRY
+_mesa_ShaderSource_no_error(GLuint, GLsizei, const GLchar* const *,
+                            const GLint *);
+
 extern void GLAPIENTRY
 _mesa_ShaderSource(GLuint, GLsizei, const GLchar* const *, const GLint *);
 
-- 
2.13.3



More information about the mesa-dev mailing list