[Mesa-dev] [RFC 23/63] mesa/formatquery: Added the INTERNALFORMAT_SUPPORTED <pname> query

Eduardo Lima Mitev elima at igalia.com
Tue Jan 19 08:42:03 PST 2016


From: Antia Puentes <apuentes at igalia.com>

---
 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 11bf133..da65624 100644
--- a/src/mesa/main/formatquery.c
+++ b/src/mesa/main/formatquery.c
@@ -575,6 +575,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;
@@ -647,7 +652,11 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,
                                       buffer);
       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:
-- 
2.5.3



More information about the mesa-dev mailing list