From 56ec2dfcb1b9e2756d550dfad9008597b1951997 Mon Sep 17 00:00:00 2001 From: Antia Puentes Date: Tue, 22 Dec 2015 15:14:23 +0100 Subject: [PATCH] mesa/formatquery: Added the INTERNALFORMAT_SUPPORTED query Reviewed-by: Dave Airlie --- src/mesa/main/formatquery.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c index 60d8b71b0d2..00abe399ed2 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 is implemented as a prerequisite + * for all the . Thus, if we reach this point, the internalformat is + * supported. + */ + buffer[0] = GL_TRUE; break; case GL_INTERNALFORMAT_PREFERRED: -- 2.30.2