summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-08-21 22:22:29 +0200
committerSamuel Pitoiset <[email protected]>2017-08-22 11:54:32 +0200
commit46a8c4ef811ce1b909615f29a4059e079db3b930 (patch)
tree4d25a59de0a897470b8589f275f13c845da714f3 /src/mesa/main/get.c
parent44cd9aeeec58ef2c271cc7d5b89ea5eda906e78e (diff)
mesa: only expose EXT_memory_object functions if the ext is supported
They should not be exposed when the extension is unsupported. Note that ARB_direct_state_access is always exposed and EXT_semaphore is not supported at all. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 93dd927bb01..8c3958b0965 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -2033,6 +2033,11 @@ _mesa_GetUnsignedBytevEXT(GLenum pname, GLubyte *data)
GET_CURRENT_CONTEXT(ctx);
+ if (!ctx->Extensions.EXT_memory_object) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func);
+ return;
+ }
+
d = find_value(func, pname, &p, &v);
size = get_value_size(d->type, &v);
if (size >= 0) {
@@ -2812,6 +2817,11 @@ _mesa_GetUnsignedBytei_vEXT(GLenum target, GLuint index, GLubyte *data)
GET_CURRENT_CONTEXT(ctx);
+ if (!ctx->Extensions.EXT_memory_object) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func);
+ return;
+ }
+
type = find_value_indexed(func, target, index, &v);
size = get_value_size(type, &v);
if (size <= 0) {