mesa: add KHR_no_error support for glBindImageTexture()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 23 May 2017 21:45:49 +0000 (23:45 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 29 May 2017 08:11:43 +0000 (10:11 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mapi/glapi/gen/ARB_shader_image_load_store.xml
src/mesa/main/shaderimage.c
src/mesa/main/shaderimage.h

index 178e930f1d5f43d060fedaa3b1e14a5fb37afc08..6e9ee1fffb8d7a7a294250844db8d54c8fdc80b6 100644 (file)
@@ -70,7 +70,7 @@
 <enum name="MAX_FRAGMENT_IMAGE_UNIFORMS" value="0x90CE"/>
 <enum name="MAX_COMBINED_IMAGE_UNIFORMS" value="0x90CF"/>
 
-<function name="BindImageTexture" es2="3.1">
+<function name="BindImageTexture" es2="3.1" no_error="true">
   <param name="unit" type="GLuint"/>
   <param name="texture" type="GLuint"/>
   <param name="level" type="GLint"/>
index 19011d80b9e054558af13776c2dc2b4f80115bcb..494125346b4cfdcdafb96e710857401c5592ee0b 100644 (file)
@@ -601,6 +601,21 @@ bind_image_texture(struct gl_context *ctx, struct gl_texture_object *texObj,
    set_image_binding(u, texObj, level, layered, layer, access, format);
 }
 
+void GLAPIENTRY
+_mesa_BindImageTexture_no_error(GLuint unit, GLuint texture, GLint level,
+                                GLboolean layered, GLint layer, GLenum access,
+                                GLenum format)
+{
+   struct gl_texture_object *texObj = NULL;
+
+   GET_CURRENT_CONTEXT(ctx);
+
+   if (texture)
+      texObj = _mesa_lookup_texture(ctx, texture);
+
+   bind_image_texture(ctx, texObj, unit, level, layered, layer, access, format);
+}
+
 void GLAPIENTRY
 _mesa_BindImageTexture(GLuint unit, GLuint texture, GLint level,
                        GLboolean layered, GLint layer, GLenum access,
index 99dddb77dfc37439483f328868177ff250beb6cb..b2b22bbf86337fc6229b7b94ac4b79b01c5bf454 100644 (file)
@@ -79,6 +79,11 @@ _mesa_init_image_units(struct gl_context *ctx);
 GLboolean
 _mesa_is_image_unit_valid(struct gl_context *ctx, struct gl_image_unit *u);
 
+void GLAPIENTRY
+_mesa_BindImageTexture_no_error(GLuint unit, GLuint texture, GLint level,
+                                GLboolean layered, GLint layer, GLenum access,
+                                GLenum format);
+
 void GLAPIENTRY
 _mesa_BindImageTexture(GLuint unit, GLuint texture, GLint level,
                        GLboolean layered, GLint layer, GLenum access,