From: Samuel Pitoiset Date: Wed, 14 Jun 2017 09:27:41 +0000 (+0200) Subject: mesa: add KHR_no_error support for glMake{Image,Texture}Handle*ResidentARB() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0fb2c89c717214df5e99c7f1bd493c9ec89cada9;p=mesa.git mesa: add KHR_no_error support for glMake{Image,Texture}Handle*ResidentARB() 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 916e198a1ee..bc82ef9d686 100644 --- a/src/mapi/glapi/gen/ARB_bindless_texture.xml +++ b/src/mapi/glapi/gen/ARB_bindless_texture.xml @@ -19,11 +19,11 @@ - + - + @@ -36,12 +36,12 @@ - + - + diff --git a/src/mesa/main/texturebindless.c b/src/mesa/main/texturebindless.c index dac6c569a5e..5c606e9f4b4 100644 --- a/src/mesa/main/texturebindless.c +++ b/src/mesa/main/texturebindless.c @@ -648,6 +648,17 @@ _mesa_GetTextureSamplerHandleARB(GLuint texture, GLuint sampler) return get_texture_handle(ctx, texObj, sampObj); } +void GLAPIENTRY +_mesa_MakeTextureHandleResidentARB_no_error(GLuint64 handle) +{ + struct gl_texture_handle_object *texHandleObj; + + GET_CURRENT_CONTEXT(ctx); + + texHandleObj = lookup_texture_handle(ctx, handle); + make_texture_handle_resident(ctx, texHandleObj, true); +} + void GLAPIENTRY _mesa_MakeTextureHandleResidentARB(GLuint64 handle) { @@ -683,6 +694,17 @@ _mesa_MakeTextureHandleResidentARB(GLuint64 handle) make_texture_handle_resident(ctx, texHandleObj, true); } +void GLAPIENTRY +_mesa_MakeTextureHandleNonResidentARB_no_error(GLuint64 handle) +{ + struct gl_texture_handle_object *texHandleObj; + + GET_CURRENT_CONTEXT(ctx); + + texHandleObj = lookup_texture_handle(ctx, handle); + make_texture_handle_resident(ctx, texHandleObj, false); +} + void GLAPIENTRY _mesa_MakeTextureHandleNonResidentARB(GLuint64 handle) { @@ -789,6 +811,17 @@ _mesa_GetImageHandleARB(GLuint texture, GLint level, GLboolean layered, return get_image_handle(ctx, texObj, level, layered, layer, format); } +void GLAPIENTRY +_mesa_MakeImageHandleResidentARB_no_error(GLuint64 handle, GLenum access) +{ + struct gl_image_handle_object *imgHandleObj; + + GET_CURRENT_CONTEXT(ctx); + + imgHandleObj = lookup_image_handle(ctx, handle); + make_image_handle_resident(ctx, imgHandleObj, access, true); +} + void GLAPIENTRY _mesa_MakeImageHandleResidentARB(GLuint64 handle, GLenum access) { @@ -833,6 +866,17 @@ _mesa_MakeImageHandleResidentARB(GLuint64 handle, GLenum access) make_image_handle_resident(ctx, imgHandleObj, access, true); } +void GLAPIENTRY +_mesa_MakeImageHandleNonResidentARB_no_error(GLuint64 handle) +{ + struct gl_image_handle_object *imgHandleObj; + + GET_CURRENT_CONTEXT(ctx); + + imgHandleObj = lookup_image_handle(ctx, handle); + make_image_handle_resident(ctx, imgHandleObj, GL_READ_ONLY, false); +} + void GLAPIENTRY _mesa_MakeImageHandleNonResidentARB(GLuint64 handle) { diff --git a/src/mesa/main/texturebindless.h b/src/mesa/main/texturebindless.h index 0fcea61d432..467105ef414 100644 --- a/src/mesa/main/texturebindless.h +++ b/src/mesa/main/texturebindless.h @@ -72,8 +72,15 @@ _mesa_GetTextureHandleARB(GLuint texture); GLuint64 GLAPIENTRY _mesa_GetTextureSamplerHandleARB(GLuint texture, GLuint sampler); +void GLAPIENTRY +_mesa_MakeTextureHandleResidentARB_no_error(GLuint64 handle); + void GLAPIENTRY _mesa_MakeTextureHandleResidentARB(GLuint64 handle); + +void GLAPIENTRY +_mesa_MakeTextureHandleNonResidentARB_no_error(GLuint64 handle); + void GLAPIENTRY _mesa_MakeTextureHandleNonResidentARB(GLuint64 handle); @@ -81,8 +88,15 @@ GLuint64 GLAPIENTRY _mesa_GetImageHandleARB(GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +void GLAPIENTRY +_mesa_MakeImageHandleResidentARB_no_error(GLuint64 handle, GLenum access); + void GLAPIENTRY _mesa_MakeImageHandleResidentARB(GLuint64 handle, GLenum access); + +void GLAPIENTRY +_mesa_MakeImageHandleNonResidentARB_no_error(GLuint64 handle); + void GLAPIENTRY _mesa_MakeImageHandleNonResidentARB(GLuint64 handle);