mesa: add KHR_no_error support to glProgramParameteri()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 18 Jul 2017 10:23:27 +0000 (12:23 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 31 Jul 2017 11:53:39 +0000 (13:53 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mapi/glapi/gen/ARB_get_program_binary.xml
src/mesa/main/shaderapi.c
src/mesa/main/shaderapi.h

index 25e0a37..c521c04 100644 (file)
@@ -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"/>
index 63aec08..c6e90ed 100644 (file)
@@ -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;
index fad5845..ae53021 100644 (file)
@@ -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);