summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-06-14 11:27:43 +0200
committerSamuel Pitoiset <[email protected]>2017-06-18 14:21:04 +0200
commit304de4edb941e42aa37002b1ca598647f5cd248f (patch)
treef233294401ba4bf164e9b3bae275e0f3550ecc1b /src/mesa
parent530ff887ebac56d9d7f0ded48282b3e1709972b1 (diff)
mesa: add KHR_no_error support for glGetImageHandleARB()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/texturebindless.c15
-rw-r--r--src/mesa/main/texturebindless.h4
2 files changed, 19 insertions, 0 deletions
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
@@ -772,6 +772,21 @@ _mesa_MakeTextureHandleNonResidentARB(GLuint64 handle)
}
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
@@ -92,6 +92,10 @@ 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);