From: Alejandro PiƱeiro Date: Thu, 5 May 2016 09:27:05 +0000 (+0200) Subject: mesa/formatquery: add a comment to clarify INTERNALFORMAT_PREFERRED X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b48c42cd1f81bf9a411d19aea2660d75622a1350;p=mesa.git mesa/formatquery: add a comment to clarify INTERNALFORMAT_PREFERRED 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 Acked-by: Antia Puentes Reviewed-by: Ian Romanick --- diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c index 215c14f889f..1f21d17fff6 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/formatquery.c @@ -902,7 +902,10 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, * format for representing resources of the specified is * returned in . * - * 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);