[Mesa-dev] [PATCH 9/9] mesa/es3.1: Pass sample count check for multisampled textures

Ian Romanick idr at freedesktop.org
Mon May 11 13:39:55 PDT 2015


On 05/11/2015 06:03 AM, Marta Lofstedt wrote:
> From: Marta Lofstedt <marta.lofstedt at intel.com>
> 
> For GLES 3.1 to support Multisample textures it needs
> to be able to pass the sample count test.
> 
> Signed-off-by: Marta Lofstedt <marta.lofstedt at intel.com>
> ---
>  src/mesa/main/multisample.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c
> index 816837b..dd18365 100644
> --- a/src/mesa/main/multisample.c
> +++ b/src/mesa/main/multisample.c
> @@ -166,7 +166,7 @@ _mesa_check_sample_count(struct gl_context *ctx, GLenum target,
>      *     is greater than zero, then the error INVALID_OPERATION is generated."
>      */
>     if (_mesa_is_gles3(ctx) && _mesa_is_enum_format_integer(internalFormat)
> -       && samples > 0) {
> +       && samples > 0 && (!_mesa_is_gles31(ctx))) {

I think I would open-code this and add a comment.

   /* ...
    *
    * The restriction is relaxed in GLES 3.1.
    */
   if ((ctx->API == API_OPENGLES2 && ctx->Version == 30) && ...)

>        return GL_INVALID_OPERATION;
>     }
>  



More information about the mesa-dev mailing list