[Mesa-dev] [PATCH 4/5] mesa: add KHR_no_error support for glBindImageTexture()
Samuel Pitoiset
samuel.pitoiset at gmail.com
Tue May 23 21:45:49 UTC 2017
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/mapi/glapi/gen/ARB_shader_image_load_store.xml | 2 +-
src/mesa/main/shaderimage.c | 15 +++++++++++++++
src/mesa/main/shaderimage.h | 5 +++++
3 files changed, 21 insertions(+), 1 deletion(-)
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);
--
2.13.0
More information about the mesa-dev
mailing list