From: Samuel Pitoiset Date: Wed, 14 Jun 2017 09:27:43 +0000 (+0200) Subject: mesa: add KHR_no_error support for glGetImageHandleARB() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=304de4edb941e42aa37002b1ca598647f5cd248f;p=mesa.git mesa: add KHR_no_error support for glGetImageHandleARB() Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- diff --git a/src/mapi/glapi/gen/ARB_bindless_texture.xml b/src/mapi/glapi/gen/ARB_bindless_texture.xml index 0f3de162de7..762cadf6fea 100644 --- a/src/mapi/glapi/gen/ARB_bindless_texture.xml +++ b/src/mapi/glapi/gen/ARB_bindless_texture.xml @@ -27,7 +27,7 @@ - + diff --git a/src/mesa/main/texturebindless.c b/src/mesa/main/texturebindless.c index a56d6e3b370..cb95ed07c5a 100644 --- a/src/mesa/main/texturebindless.c +++ b/src/mesa/main/texturebindless.c @@ -771,6 +771,21 @@ _mesa_MakeTextureHandleNonResidentARB(GLuint64 handle) make_texture_handle_resident(ctx, texHandleObj, false); } +GLuint64 GLAPIENTRY +_mesa_GetImageHandleARB_no_error(GLuint texture, GLint level, GLboolean layered, + GLint layer, GLenum format) +{ + struct gl_texture_object *texObj; + + GET_CURRENT_CONTEXT(ctx); + + texObj = _mesa_lookup_texture(ctx, texture); + if (!_mesa_is_texture_complete(texObj, &texObj->Sampler)) + _mesa_test_texobj_completeness(ctx, texObj); + + return get_image_handle(ctx, texObj, level, layered, layer, format); +} + GLuint64 GLAPIENTRY _mesa_GetImageHandleARB(GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format) diff --git a/src/mesa/main/texturebindless.h b/src/mesa/main/texturebindless.h index 62c954b6576..8a9fff6d57e 100644 --- a/src/mesa/main/texturebindless.h +++ b/src/mesa/main/texturebindless.h @@ -91,6 +91,10 @@ _mesa_MakeTextureHandleNonResidentARB_no_error(GLuint64 handle); void GLAPIENTRY _mesa_MakeTextureHandleNonResidentARB(GLuint64 handle); +GLuint64 GLAPIENTRY +_mesa_GetImageHandleARB_no_error(GLuint texture, GLint level, GLboolean layered, + GLint layer, GLenum format); + GLuint64 GLAPIENTRY _mesa_GetImageHandleARB(GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);