mesa: add KHR_no_error support for glUniformBlockBinding()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 26 Jun 2017 13:09:04 +0000 (15:09 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 28 Jun 2017 08:25:13 +0000 (10:25 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mapi/glapi/gen/ARB_uniform_buffer_object.xml
src/mesa/main/uniforms.c
src/mesa/main/uniforms.h

index cf86bbb2f8ad7153f915ba1e94f09a672d10225c..47bb04725ecff14c863f13d1e48744e76fd029c3 100644 (file)
@@ -86,7 +86,7 @@
 <!-- Duplicated with GL3x.xml: BindBufferRange, BindBufferBase,
      GetIntegeri_v -->
 
-<function name="UniformBlockBinding" es2="3.0">
+<function name="UniformBlockBinding" es2="3.0" no_error="true">
     <param name="program" type="GLuint" />
     <param name="uniformBlockIndex" type="GLuint" />
     <param name="uniformBlockBinding" type="GLuint" />
index ef57866d6dcfee3d32f3c452050a69c09b1fc78e..a71e0695b0544222c2ad218ac10d052db2d9a417 100644 (file)
@@ -1100,6 +1100,16 @@ uniform_block_binding(struct gl_context *ctx, struct gl_shader_program *shProg,
    }
 }
 
+void GLAPIENTRY
+_mesa_UniformBlockBinding_no_error(GLuint program, GLuint uniformBlockIndex,
+                                   GLuint uniformBlockBinding)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, program);
+   uniform_block_binding(ctx, shProg, uniformBlockIndex, uniformBlockBinding);
+}
+
 void GLAPIENTRY
 _mesa_UniformBlockBinding(GLuint program,
                          GLuint uniformBlockIndex,
index ebeaf9deb1db04859bcd029f367447b2da805ecf..098b5d40c0d2817773952fcfef9681a52aff830a 100644 (file)
@@ -232,6 +232,11 @@ _mesa_GetUniformIndices(GLuint program,
                        GLsizei uniformCount,
                        const GLchar * const *uniformNames,
                        GLuint *uniformIndices);
+
+void GLAPIENTRY
+_mesa_UniformBlockBinding_no_error(GLuint program, GLuint uniformBlockIndex,
+                                   GLuint uniformBlockBinding);
+
 void GLAPIENTRY
 _mesa_UniformBlockBinding(GLuint program,
                          GLuint uniformBlockIndex,