summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/formatquery.c
diff options
context:
space:
mode:
authorAntia Puentes <apuentes@igalia.com>2015-12-22 15:14:23 +0100
committerEduardo Lima Mitev <elima@igalia.com>2016-03-03 15:14:06 +0100
commit56ec2dfcb1b9e2756d550dfad9008597b1951997 (patch)
tree139711559e5b5f29b9fa3711787310b185c47cae /src/mesa/main/formatquery.c
parent4722abc6300249e5afeff54e1286d2261c26bd28 (diff)
downloadexternal_mesa3d-56ec2dfcb1b9e2756d550dfad9008597b1951997.zip
external_mesa3d-56ec2dfcb1b9e2756d550dfad9008597b1951997.tar.gz
external_mesa3d-56ec2dfcb1b9e2756d550dfad9008597b1951997.tar.bz2
mesa/formatquery: Added the INTERNALFORMAT_SUPPORTED <pname> query
Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/mesa/main/formatquery.c')
-rw-r--r--src/mesa/main/formatquery.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c
index 60d8b71..00abe39 100644
--- a/src/mesa/main/formatquery.c
+++ b/src/mesa/main/formatquery.c
@@ -577,6 +577,11 @@ _mesa_query_internal_format_default(struct gl_context *ctx, GLenum target,
case GL_NUM_SAMPLE_COUNTS:
params[0] = 1;
break;
+
+ case GL_INTERNALFORMAT_SUPPORTED:
+ params[0] = GL_TRUE;
+ break;
+
default:
_set_default_response(pname, params);
break;
@@ -652,7 +657,11 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,
break;
case GL_INTERNALFORMAT_SUPPORTED:
- /* @TODO */
+ /* Having a supported <internalformat> is implemented as a prerequisite
+ * for all the <pnames>. Thus, if we reach this point, the internalformat is
+ * supported.
+ */
+ buffer[0] = GL_TRUE;
break;
case GL_INTERNALFORMAT_PREFERRED: