From 2a0195f4b9e535945a2df9c16469d923a696126a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 20 Dec 2020 00:43:39 -0500 Subject: [PATCH] st/xa: stop using cso_set_sampler_views It will be removed. Reviewed-by: Eric Anholt Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/frontends/xa/xa_composite.c | 4 ++-- src/gallium/frontends/xa/xa_context.c | 2 +- src/gallium/frontends/xa/xa_renderer.c | 2 +- src/gallium/frontends/xa/xa_yuv.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/frontends/xa/xa_composite.c b/src/gallium/frontends/xa/xa_composite.c index 34d78027e27..45bc031e8c0 100644 --- a/src/gallium/frontends/xa/xa_composite.c +++ b/src/gallium/frontends/xa/xa_composite.c @@ -504,8 +504,8 @@ bind_samplers(struct xa_context *ctx, cso_set_samplers(ctx->cso, PIPE_SHADER_FRAGMENT, num_samplers, (const struct pipe_sampler_state **)samplers); - cso_set_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT, num_samplers, - ctx->bound_sampler_views); + pipe->set_sampler_views(pipe, PIPE_SHADER_FRAGMENT, 0, num_samplers, + ctx->bound_sampler_views); ctx->num_bound_samplers = num_samplers; } diff --git a/src/gallium/frontends/xa/xa_context.c b/src/gallium/frontends/xa/xa_context.c index 8593644fb09..dc9586dd4b0 100644 --- a/src/gallium/frontends/xa/xa_context.c +++ b/src/gallium/frontends/xa/xa_context.c @@ -327,7 +327,7 @@ xa_solid_prepare(struct xa_context *ctx, struct xa_surface *dst, renderer_bind_destination(ctx, ctx->srf); bind_solid_blend_state(ctx); cso_set_samplers(ctx->cso, PIPE_SHADER_FRAGMENT, 0, NULL); - cso_set_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT, 0, NULL); + ctx->pipe->set_sampler_views(ctx->pipe, PIPE_SHADER_FRAGMENT, 0, XA_MAX_SAMPLERS, NULL); shader = xa_shaders_get(ctx->shaders, vs_traits, fs_traits); cso_set_vertex_shader_handle(ctx->cso, shader.vs); diff --git a/src/gallium/frontends/xa/xa_renderer.c b/src/gallium/frontends/xa/xa_renderer.c index 89548ad7019..91d129b0338 100644 --- a/src/gallium/frontends/xa/xa_renderer.c +++ b/src/gallium/frontends/xa/xa_renderer.c @@ -442,7 +442,7 @@ renderer_copy_prepare(struct xa_context *r, u_sampler_view_default_template(&templ, src_texture, src_texture->format); src_view = pipe->create_sampler_view(pipe, src_texture, &templ); - cso_set_sampler_views(r->cso, PIPE_SHADER_FRAGMENT, 1, &src_view); + pipe->set_sampler_views(pipe, PIPE_SHADER_FRAGMENT, 0, 1, &src_view); pipe_sampler_view_reference(&src_view, NULL); } diff --git a/src/gallium/frontends/xa/xa_yuv.c b/src/gallium/frontends/xa/xa_yuv.c index 97a1833ff15..ce49aa23d8b 100644 --- a/src/gallium/frontends/xa/xa_yuv.c +++ b/src/gallium/frontends/xa/xa_yuv.c @@ -93,7 +93,7 @@ xa_yuv_bind_samplers(struct xa_context *r, struct xa_surface *yuv[]) } r->num_bound_samplers = 3; cso_set_samplers(r->cso, PIPE_SHADER_FRAGMENT, 3, (const struct pipe_sampler_state **)samplers); - cso_set_sampler_views(r->cso, PIPE_SHADER_FRAGMENT, 3, r->bound_sampler_views); + r->pipe->set_sampler_views(r->pipe, PIPE_SHADER_FRAGMENT, 0, 3, r->bound_sampler_views); } static void