From def908af6ce9c7ab39c768d7c5a85375c463869d Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 23 May 2017 23:45:49 +0200 Subject: mesa: add KHR_no_error support for glBindImageTexture() Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- 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 @@ - + 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 @@ -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, 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 @@ -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, -- cgit v1.2.3