[Mesa-dev] [PATCH] st/mesa: set ctx->Const.MaxSamples = 0, not 1

Marek Olšák maraeo at gmail.com
Sat Jan 26 12:10:37 PST 2013


Reviewed-by: Marek Olšák <maraeo at gmail.com>

Marek

On Sat, Jan 26, 2013 at 6:11 PM, Brian Paul <brianp at vmware.com> wrote:
> The gallium docs for pipe_screen::is_format_supported() says that
> samples==0 or samples==1 both mean that multisampling is not supported.
> Return GL_MAX_SAMPLES==0 instead of 1 for consistency with other drivers.
>
> Note: This is a candidate for the 9.0 branch.
> ---
>  src/mesa/state_tracker/st_extensions.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index af54cf7..f0d8a4c 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -653,6 +653,10 @@ void st_init_extensions(struct st_context *st)
>           break;
>        }
>     }
> +   if (ctx->Const.MaxSamples == 1) {
> +      /* one sample doesn't really make sense */
> +      ctx->Const.MaxSamples = 0;
> +   }
>
>     if (ctx->Const.MaxDualSourceDrawBuffers > 0)
>        ctx->Extensions.ARB_blend_func_extended = GL_TRUE;
> --
> 1.7.3.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list