summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_blit.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-06-18 03:23:46 +0200
committerMarek Olšák <[email protected]>2014-07-18 01:58:59 +0200
commit1635ded8287377836b2cc7c8466cb3b3c2c658f4 (patch)
treea6e0c6da3f30a1de6ff0c6ab8c8970ebfd2dec9d /src/gallium/drivers/radeonsi/si_blit.c
parentbea8f2f46dbc07b75762f5b88464580c49177b25 (diff)
radeonsi: add support for fine-grained sampler view updates
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_blit.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_blit.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
index a76d9052494..9b0186761a4 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -74,9 +74,7 @@ static void si_blitter_begin(struct pipe_context *ctx, enum si_blitter_op op)
sctx->blitter, 2,
sctx->samplers[PIPE_SHADER_FRAGMENT].states.saved_states);
- util_blitter_save_fragment_sampler_views(sctx->blitter,
- util_last_bit(sctx->samplers[PIPE_SHADER_FRAGMENT].views.desc.enabled_mask &
- ((1 << SI_NUM_USER_SAMPLERS) - 1)),
+ util_blitter_save_fragment_sampler_views(sctx->blitter, 2,
sctx->samplers[PIPE_SHADER_FRAGMENT].views.views);
}
@@ -227,17 +225,19 @@ void si_flush_depth_textures(struct si_context *sctx,
struct si_textures_info *textures)
{
unsigned i;
+ unsigned mask = textures->depth_texture_mask;
- for (i = 0; i < textures->n_views; ++i) {
+ while (mask) {
struct pipe_sampler_view *view;
struct r600_texture *tex;
+ i = u_bit_scan(&mask);
+
view = textures->views.views[i];
- if (!view) continue;
+ assert(view);
tex = (struct r600_texture *)view->texture;
- if (!tex->is_depth || tex->is_flushing_texture)
- continue;
+ assert(tex->is_depth && !tex->is_flushing_texture);
si_blit_decompress_depth_in_place(sctx, tex,
view->u.tex.first_level, view->u.tex.last_level,