[Mesa-dev] [PATCH] gallium: new, unified pipe_context::set_sampler_views() function

Rob Clark robdclark at gmail.com
Wed Oct 23 13:17:20 PDT 2013


On Mon, Oct 7, 2013 at 8:23 PM, Brian Paul <brianp at vmware.com> wrote:
> diff --git a/src/gallium/drivers/freedreno/freedreno_texture.c b/src/gallium/drivers/freedreno/freedreno_texture.c
> index fc0c8aa..bcc846f 100644
> --- a/src/gallium/drivers/freedreno/freedreno_texture.c
> +++ b/src/gallium/drivers/freedreno/freedreno_texture.c
> @@ -144,6 +144,24 @@ fd_verttex_set_sampler_views(struct pipe_context *pctx, unsigned nr,
>         ctx->dirty |= FD_DIRTY_VERTTEX;
>  }
>
> +static void
> +fd_set_sampler_views(struct pipe_context *pctx, unsigned shader,
> +                     unsigne start, unsigned nr,

really small typo there (s/unsigne/unsigned) looks like what broke
freedreno gallium build in tinderbox..

I can push a fix a bit later once I have a few minutes to commit some
work-in-progress stuff and rebase..

BR,
-R


> +                     struct pipe_sampler_view **views)
> +{
> +   assert(start == 0);
> +   switch (shader) {
> +   case PIPE_SHADER_FRAGMENT:
> +      fd_fragtex_set_sampler_views(pctx, nr, views);
> +      break;
> +   case PIPE_SHADER_VERTEX:
> +      fd_verttex_set_sampler_views(pctx, nr, views);
> +      break;
> +   default:
> +      ;
> +   }
> +}
> +
>  void
>  fd_texture_init(struct pipe_context *pctx)
>  {
> @@ -152,7 +170,5 @@ fd_texture_init(struct pipe_context *pctx)
>         pctx->sampler_view_destroy = fd_sampler_view_destroy;
>
>         pctx->bind_sampler_states = fd_sampler_states_bind;
> -       pctx->set_fragment_sampler_views = fd_fragtex_set_sampler_views;
> -
> -       pctx->set_vertex_sampler_views = fd_verttex_set_sampler_views;
> +       pctx->set_sampler_views = fd_set_sampler_views;
>  }


More information about the mesa-dev mailing list