[Mesa-dev] [PATCH 2/2] gallium/noop: fix sampler views

Nicolai Hähnle nhaehnle at gmail.com
Mon Jun 12 09:03:37 UTC 2017


For the series:

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

On 09.06.2017 15:49, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> ---
>   src/gallium/drivers/noop/noop_state.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/src/gallium/drivers/noop/noop_state.c b/src/gallium/drivers/noop/noop_state.c
> index 46d99ab..80cfae8 100644
> --- a/src/gallium/drivers/noop/noop_state.c
> +++ b/src/gallium/drivers/noop/noop_state.c
> @@ -69,21 +69,24 @@ static void *noop_create_sampler_state(struct pipe_context *ctx,
>   }
>   
>   static struct pipe_sampler_view *noop_create_sampler_view(struct pipe_context *ctx,
>                                                             struct pipe_resource *texture,
>                                                             const struct pipe_sampler_view *state)
>   {
>      struct pipe_sampler_view *sampler_view = CALLOC_STRUCT(pipe_sampler_view);
>   
>      if (!sampler_view)
>         return NULL;
> +
>      /* initialize base object */
> +   *sampler_view = *state;
> +   sampler_view->texture = NULL;
>      pipe_resource_reference(&sampler_view->texture, texture);
>      pipe_reference_init(&sampler_view->reference, 1);
>      sampler_view->context = ctx;
>      return sampler_view;
>   }
>   
>   static struct pipe_surface *noop_create_surface(struct pipe_context *ctx,
>                                                   struct pipe_resource *texture,
>                                                   const struct pipe_surface *surf_tmpl)
>   {
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list