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

Eduardo Lima Mitev elima at igalia.com
Wed Feb 3 15:45:08 UTC 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 4ce1709..73eeba4 100644
--- a/src/mesa/main/formatquery.c
+++ b/src/mesa/main/formatquery.c
@@ -572,6 +572,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;
@@ -644,7 +649,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