[Mesa-dev] [PATCH 3/5] mesa/formatquery: expand NUM_SAMPLE_COUNTS OpenGL ES comment

Alejandro PiƱeiro apinheiro at igalia.com
Fri May 13 14:57:05 UTC 2016


For ES 3.0 NUM_SAMPLE_COUNTS spec points that some formats will be
always zero. But on ES 3.1 can be different to zero.

The current code is correctly checking exactly against version 3.0,
but the comment only mentions 3.0 spec. It is clearer mentioning both.

Acked-by: Eduardo Lima <elima at igalia.com>
Acked-by: Antia Puentes <apuentes at igalia.com>
---
 src/mesa/main/formatquery.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c
index 1f21d17..1dfec5c 100644
--- a/src/mesa/main/formatquery.c
+++ b/src/mesa/main/formatquery.c
@@ -877,6 +877,9 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,
        *     "Since multisampling is not supported for signed and unsigned
        *     integer internal formats, the value of NUM_SAMPLE_COUNTS will be
        *     zero for such formats.
+       *
+       * But that is not true for GL ES 3.1. This is the reason why we are
+       * checking against exactly version 30, instead of use _mesa_is_gles3.
        */
       if (pname == GL_NUM_SAMPLE_COUNTS && ctx->API == API_OPENGLES2 &&
           ctx->Version == 30 && _mesa_is_enum_format_integer(internalformat)) {
-- 
2.7.4



More information about the mesa-dev mailing list