summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/formatquery.c
diff options
context:
space:
mode:
authorAlejandro Piñeiro <apinheiro@igalia.com>2016-05-05 11:27:05 +0200
committerAlejandro Piñeiro <apinheiro@igalia.com>2016-06-02 08:54:17 +0200
commitb48c42cd1f81bf9a411d19aea2660d75622a1350 (patch)
treee49c50d7209526d80a6ffa1bd6e830b72cbe7a23 /src/mesa/main/formatquery.c
parentc1ceee6cc966e25fb1e68d267bafdeb4528bc980 (diff)
downloadexternal_mesa3d-b48c42cd1f81bf9a411d19aea2660d75622a1350.zip
external_mesa3d-b48c42cd1f81bf9a411d19aea2660d75622a1350.tar.gz
external_mesa3d-b48c42cd1f81bf9a411d19aea2660d75622a1350.tar.bz2
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 <elima@igalia.com> Acked-by: Antia Puentes <apuentes@igalia.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/main/formatquery.c')
-rw-r--r--src/mesa/main/formatquery.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c
index 215c14f..1f21d17 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 <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);