[Mesa-dev] [PATCH 1/3] cso: handle sampler view changes the same way for all shader types

Ilia Mirkin imirkin at alum.mit.edu
Thu Dec 10 13:10:00 PST 2015


On Thu, Dec 10, 2015 at 4:08 PM, Brian Paul <brianp at vmware.com> wrote:
> diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
> index 6b29b20..5db3d20 100644
> --- a/src/gallium/auxiliary/cso_cache/cso_context.c
> +++ b/src/gallium/auxiliary/cso_cache/cso_context.c
> @@ -61,6 +61,16 @@ struct sampler_info
>  };
>
>
> +/**
> + * Per-shader sampler view information.
> + */
> +struct sampler_view_info
> +{
> +   struct pipe_sampler_view *views[PIPE_MAX_SAMPLERS];

Should this be PIPE_MAX_SHADER_SAMPLER_VIEWS ?

> +   unsigned nr_views;
> +};
> +
> +
>
>  struct cso_context {
>     struct pipe_context *pipe;
> @@ -71,8 +81,7 @@ struct cso_context {
>     boolean has_tessellation;
>     boolean has_streamout;
>
> -   struct pipe_sampler_view *fragment_views[PIPE_MAX_SHADER_SAMPLER_VIEWS];
> -   unsigned nr_fragment_views;
> +   struct sampler_view_info sampler_views[PIPE_SHADER_TYPES];
>
>     struct pipe_sampler_view *fragment_views_saved[PIPE_MAX_SHADER_SAMPLER_VIEWS];
>     unsigned nr_fragment_views_saved;


More information about the mesa-dev mailing list