diff options
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index da7c3d0ab0c..97710f01e7a 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2608,14 +2608,21 @@ static void *si_create_sampler_state(struct pipe_context *ctx, /* XXX consider moving this function to si_descriptors.c for gcc to inline * the si_set_sampler_view calls. LTO might help too. */ -static void si_set_sampler_views(struct r600_context *rctx, - unsigned shader, unsigned count, +static void si_set_sampler_views(struct pipe_context *ctx, + unsigned shader, unsigned start, + unsigned count, struct pipe_sampler_view **views) { + struct r600_context *rctx = (struct r600_context *)ctx; struct r600_textures_info *samplers = &rctx->samplers[shader]; struct si_pipe_sampler_view **rviews = (struct si_pipe_sampler_view **)views; int i; + if (shader != PIPE_SHADER_VERTEX && shader != PIPE_SHADER_FRAGMENT) + return; + + assert(start == 0); + for (i = 0; i < count; i++) { if (views[i]) { struct r600_texture *rtex = @@ -2661,22 +2668,6 @@ static void si_set_sampler_views(struct r600_context *rctx, rctx->b.flags |= R600_CONTEXT_INV_TEX_CACHE; } -static void si_set_vs_sampler_views(struct pipe_context *ctx, unsigned count, - struct pipe_sampler_view **views) -{ - struct r600_context *rctx = (struct r600_context *)ctx; - - si_set_sampler_views(rctx, PIPE_SHADER_VERTEX, count, views); -} - -static void si_set_ps_sampler_views(struct pipe_context *ctx, unsigned count, - struct pipe_sampler_view **views) -{ - struct r600_context *rctx = (struct r600_context *)ctx; - - si_set_sampler_views(rctx, PIPE_SHADER_FRAGMENT, count, views); -} - static struct si_pm4_state *si_set_sampler_states(struct r600_context *rctx, unsigned count, void **states, struct r600_textures_info *samplers, @@ -3033,8 +3024,7 @@ void si_init_state_functions(struct r600_context *rctx) rctx->b.b.delete_sampler_state = si_delete_sampler_state; rctx->b.b.create_sampler_view = si_create_sampler_view; - rctx->b.b.set_vertex_sampler_views = si_set_vs_sampler_views; - rctx->b.b.set_fragment_sampler_views = si_set_ps_sampler_views; + rctx->b.b.set_sampler_views = si_set_sampler_views; rctx->b.b.sampler_view_destroy = si_sampler_view_destroy; rctx->b.b.set_sample_mask = si_set_sample_mask; |