summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-05-23 23:45:49 +0200
committerSamuel Pitoiset <[email protected]>2017-05-29 10:11:43 +0200
commitdef908af6ce9c7ab39c768d7c5a85375c463869d (patch)
tree8a1b5f5201f6a226a2855bf994731107359d38e4 /src
parent3ca5da270449d1f5baa8325a401d3cd100de987a (diff)
mesa: add KHR_no_error support for glBindImageTexture()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mapi/glapi/gen/ARB_shader_image_load_store.xml2
-rw-r--r--src/mesa/main/shaderimage.c15
-rw-r--r--src/mesa/main/shaderimage.h5
3 files changed, 21 insertions, 1 deletions
diff --git a/src/mapi/glapi/gen/ARB_shader_image_load_store.xml b/src/mapi/glapi/gen/ARB_shader_image_load_store.xml
index 178e930f1d5..6e9ee1fffb8 100644
--- a/src/mapi/glapi/gen/ARB_shader_image_load_store.xml
+++ b/src/mapi/glapi/gen/ARB_shader_image_load_store.xml
@@ -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"/>
diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c
index 19011d80b9e..494125346b4 100644
--- a/src/mesa/main/shaderimage.c
+++ b/src/mesa/main/shaderimage.c
@@ -602,6 +602,21 @@ bind_image_texture(struct gl_context *ctx, struct gl_texture_object *texObj,
}
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,
GLenum format)
diff --git a/src/mesa/main/shaderimage.h b/src/mesa/main/shaderimage.h
index 99dddb77dfc..b2b22bbf863 100644
--- a/src/mesa/main/shaderimage.h
+++ b/src/mesa/main/shaderimage.h
@@ -80,6 +80,11 @@ 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,
GLenum format);