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

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Jul 21 17:39:24 UTC 2017


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

diff --git a/src/mapi/glapi/gen/ARB_get_program_binary.xml b/src/mapi/glapi/gen/ARB_get_program_binary.xml
index 25e0a37c84..c521c04de4 100644
--- a/src/mapi/glapi/gen/ARB_get_program_binary.xml
+++ b/src/mapi/glapi/gen/ARB_get_program_binary.xml
@@ -26,7 +26,7 @@
         <param name="length" type="GLsizei"/>
     </function>
 
-    <function name="ProgramParameteri" es2="3.0">
+    <function name="ProgramParameteri" es2="3.0" no_error="true">
         <param name="program" type="GLuint"/>
         <param name="pname" type="GLenum"/>
         <param name="value" type="GLint"/>
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 63aec08d0c..c6e90edc94 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -2215,6 +2215,16 @@ invalid_value:
 
 
 void GLAPIENTRY
+_mesa_ProgramParameteri_no_error(GLuint program, GLenum pname, GLint value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, program);
+   program_parameteri(ctx, shProg, pname, value, true);
+}
+
+
+void GLAPIENTRY
 _mesa_ProgramParameteri(GLuint program, GLenum pname, GLint value)
 {
    struct gl_shader_program *shProg;
diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
index fad584506c..ae53021d91 100644
--- a/src/mesa/main/shaderapi.h
+++ b/src/mesa/main/shaderapi.h
@@ -234,6 +234,9 @@ extern void GLAPIENTRY
 _mesa_ProgramBinary(GLuint program, GLenum binaryFormat,
                     const GLvoid *binary, GLsizei length);
 
+void GLAPIENTRY
+_mesa_ProgramParameteri_no_error(GLuint program, GLenum pname, GLint value);
+
 extern void GLAPIENTRY
 _mesa_ProgramParameteri(GLuint program, GLenum pname, GLint value);
 
-- 
2.13.3



More information about the mesa-dev mailing list