mesa: add KHR_no_error support for glMake{Image,Texture}Handle*ResidentARB()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 14 Jun 2017 09:27:41 +0000 (11:27 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sun, 18 Jun 2017 12:20:59 +0000 (14:20 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mapi/glapi/gen/ARB_bindless_texture.xml
src/mesa/main/texturebindless.c
src/mesa/main/texturebindless.h

index 916e198a1eef4013d7d138f388c43997bb3715f8..bc82ef9d686800b947f316526db2f79c64d7db4b 100644 (file)
       <param name="sampler" type="GLuint" />
    </function>
 
-   <function name="MakeTextureHandleResidentARB">
+   <function name="MakeTextureHandleResidentARB" no_error="true">
       <param name="handle" type="GLuint64" />
    </function>
 
-   <function name="MakeTextureHandleNonResidentARB">
+   <function name="MakeTextureHandleNonResidentARB" no_error="true">
       <param name="handle" type="GLuint64" />
    </function>
 
       <param name="format" type="GLenum" />
    </function>
 
-   <function name="MakeImageHandleResidentARB">
+   <function name="MakeImageHandleResidentARB" no_error="true">
       <param name="handle" type="GLuint64" />
       <param name="access" type="GLenum" />
    </function>
 
-   <function name="MakeImageHandleNonResidentARB">
+   <function name="MakeImageHandleNonResidentARB" no_error="true">
       <param name="handle" type="GLuint64" />
    </function>
 
index dac6c569a5eaf632ed6c621555d3249bf4abf768..5c606e9f4b4d00064ec921f44a971cd9a4345685 100644 (file)
@@ -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)
 {
index 0fcea61d4328ff87883f8c9c35bf174c9b8aa461..467105ef41456f2d8560b55d11eaf680b514984b 100644 (file)
@@ -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);