[Mesa-dev] [PATCH 2/2] st/mesa: get max supported number of image samples from driver

Marek Olšák maraeo at gmail.com
Wed Jun 29 09:22:11 UTC 2016


This patch is:

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

My latest radeonsi patch is required to disable multisample shader images.

Marek

On Wed, Jun 29, 2016 at 6:13 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>  src/mesa/state_tracker/st_extensions.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index b87c9ce..b55b2c2 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -443,7 +443,6 @@ void st_init_limits(struct pipe_screen *screen,
>           c->Program[MESA_SHADER_COMPUTE].MaxImageUniforms;
>     c->MaxCombinedShaderOutputResources += c->MaxCombinedImageUniforms;
>     c->MaxImageUnits = MAX_IMAGE_UNITS;
> -   c->MaxImageSamples = 0; /* XXX */
>     if (c->MaxCombinedImageUniforms) {
>        extensions->ARB_shader_image_load_store = GL_TRUE;
>        extensions->ARB_shader_image_size = GL_TRUE;
> @@ -988,6 +987,11 @@ void st_init_extensions(struct pipe_screen *screen,
>                                       color_formats, 16,
>                                       PIPE_BIND_RENDER_TARGET);
>
> +      consts->MaxImageSamples =
> +         get_max_samples_for_formats(screen, ARRAY_SIZE(color_formats),
> +                                     color_formats, 16,
> +                                     PIPE_BIND_SHADER_IMAGE);
> +
>        consts->MaxColorTextureSamples =
>           get_max_samples_for_formats(screen, ARRAY_SIZE(color_formats),
>                                       color_formats, consts->MaxSamples,
> --
> 2.7.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list