diff options
author | Nicolai Hähnle <[email protected]> | 2016-06-03 15:03:59 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-06-07 15:17:55 +0200 |
commit | e6612a3e685b57714c3acde66b88bfee8aeb107f (patch) | |
tree | f9381d016c67c6f1386a1cf9239e3995ef02e900 /src/gallium/drivers | |
parent | c32cd4b78dba16abae5e4cb9ed96d58a2578401c (diff) |
radeonsi: pass shader stage to si_set_sampler_view
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_descriptors.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index 0065ac55856..b1abdd2ba8b 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -330,10 +330,11 @@ void si_set_mutable_tex_desc_fields(struct r600_texture *tex, } static void si_set_sampler_view(struct si_context *sctx, - struct si_sampler_views *views, + unsigned shader, unsigned slot, struct pipe_sampler_view *view, bool disallow_early_out) { + struct si_sampler_views *views = &sctx->samplers[shader].views; struct si_sampler_view *rview = (struct si_sampler_view*)view; if (views->views[slot] == view && !disallow_early_out) @@ -412,11 +413,11 @@ static void si_set_sampler_views(struct pipe_context *ctx, if (!views || !views[i]) { samplers->depth_texture_mask &= ~(1u << slot); samplers->compressed_colortex_mask &= ~(1u << slot); - si_set_sampler_view(sctx, &samplers->views, slot, NULL, false); + si_set_sampler_view(sctx, shader, slot, NULL, false); continue; } - si_set_sampler_view(sctx, &samplers->views, slot, views[i], false); + si_set_sampler_view(sctx, shader, slot, views[i], false); if (views[i]->texture && views[i]->texture->target != PIPE_BUFFER) { struct r600_texture *rtex = @@ -1433,7 +1434,7 @@ void si_update_all_texture_descriptors(struct si_context *sctx) view->texture->target == PIPE_BUFFER) continue; - si_set_sampler_view(sctx, samplers, i, + si_set_sampler_view(sctx, shader, i, samplers->views[i], true); } } |