mesa/formatquery: add a comment to clarify INTERNALFORMAT_PREFERRED
authorAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 5 May 2016 09:27:05 +0000 (11:27 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 2 Jun 2016 06:54:17 +0000 (08:54 +0200)
The comment clarifies that the driver is called only to try to get
a preferred internalformat, and that it was already checked if the
format is supported or not.

Acked-by: Eduardo Lima <elima@igalia.com>
Acked-by: Antia Puentes <apuentes@igalia.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/formatquery.c

index 215c14f889fe131c1e350f1bf1d347e15e7a0a0a..1f21d17fff6c13a4a5a65bd29cef7d4b2daefeca 100644 (file)
@@ -902,7 +902,10 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,
        *     format for representing resources of the specified <internalformat> is
        *     returned in <params>.
        *
-       * Therefore, we let the driver answer.
+       * Therefore, we let the driver answer. Note that if we reach this
+       * point, it means that the internalformat is supported, so the driver
+       * is called just to try to get a preferred format. If not supported,
+       * GL_NONE was already returned and the driver is not called.
        */
       ctx->Driver.QueryInternalFormat(ctx, target, internalformat, pname,
                                       buffer);