diff options
author | Marek Olšák <[email protected]> | 2012-08-13 19:52:57 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-08-27 04:31:00 +0200 |
commit | 48edfe0505ee79d35f770f53b9c9b7ca3c69fd2b (patch) | |
tree | 2c44b3a9fcad64a48df83e7d8faf9e998a76cb1a /src/gallium | |
parent | 3ac54ac2c85d3ed035a9f1cbcc7de7010c609cfb (diff) |
r600g: cleanup names around depth decompression
for consistency with the upcoming color decompression naming
Reviewed-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r600/r600_blit.c | 18 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 8 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_resource.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state_common.c | 18 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_texture.c | 2 |
5 files changed, 24 insertions, 24 deletions
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c index b14dc6bd5fe..c4ad0f20ed4 100644 --- a/src/gallium/drivers/r600/r600_blit.c +++ b/src/gallium/drivers/r600/r600_blit.c @@ -127,7 +127,7 @@ static unsigned u_max_sample(struct pipe_resource *r) return r->nr_samples ? r->nr_samples - 1 : 0; } -void r600_blit_uncompress_depth(struct pipe_context *ctx, +void r600_blit_decompress_depth(struct pipe_context *ctx, struct r600_texture *texture, struct r600_texture *staging, unsigned first_level, unsigned last_level, @@ -142,7 +142,7 @@ void r600_blit_uncompress_depth(struct pipe_context *ctx, util_format_description(texture->resource.b.b.format); float depth; - if (!staging && !texture->dirty_db_mask) + if (!staging && !texture->dirty_level_mask) return; if (rctx->family == CHIP_RV610 || rctx->family == CHIP_RV630 || @@ -161,7 +161,7 @@ void r600_blit_uncompress_depth(struct pipe_context *ctx, max_sample = u_max_sample(&texture->resource.b.b); for (level = first_level; level <= last_level; level++) { - if (!staging && !(texture->dirty_db_mask & (1 << level))) + if (!staging && !(texture->dirty_level_mask & (1 << level))) continue; /* The smaller the mipmap level, the less layers there are @@ -209,7 +209,7 @@ void r600_blit_uncompress_depth(struct pipe_context *ctx, if (!staging && first_layer == 0 && last_layer == max_layer && first_sample == 0 && last_sample == max_sample) { - texture->dirty_db_mask &= ~(1 << level); + texture->dirty_level_mask &= ~(1 << level); } } @@ -218,11 +218,11 @@ void r600_blit_uncompress_depth(struct pipe_context *ctx, r600_atom_dirty(rctx, &rctx->db_misc_state.atom); } -void r600_flush_depth_textures(struct r600_context *rctx, +void r600_decompress_depth_textures(struct r600_context *rctx, struct r600_samplerview_state *textures) { unsigned i; - unsigned depth_texture_mask = textures->depth_texture_mask; + unsigned depth_texture_mask = textures->compressed_depthtex_mask; while (depth_texture_mask) { struct pipe_sampler_view *view; @@ -236,7 +236,7 @@ void r600_flush_depth_textures(struct r600_context *rctx, tex = (struct r600_texture *)view->texture; assert(tex->is_depth && !tex->is_flushing_texture); - r600_blit_uncompress_depth(&rctx->context, tex, NULL, + r600_blit_decompress_depth(&rctx->context, tex, NULL, view->u.tex.first_level, view->u.tex.last_level, 0, u_max_layer(&tex->resource.b.b, view->u.tex.first_level), 0, u_max_sample(&tex->resource.b.b)); @@ -257,7 +257,7 @@ static void r600_copy_first_sample(struct pipe_context *ctx, return; /* error */ /* Decompress the first sample only. */ - r600_blit_uncompress_depth(ctx, rsrc, NULL, + r600_blit_decompress_depth(ctx, rsrc, NULL, 0, 0, info->src.layer, info->src.layer, 0, 0); @@ -596,7 +596,7 @@ static void r600_resource_copy_region(struct pipe_context *ctx, if (!r600_init_flushed_depth_texture(ctx, src, NULL)) return; /* error */ - r600_blit_uncompress_depth(ctx, rsrc, NULL, + r600_blit_decompress_depth(ctx, rsrc, NULL, src_level, src_level, src_box->z, src_box->z + src_box->depth - 1, 0, u_max_sample(src)); diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 3686521862e..0aff0f680d8 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -267,7 +267,7 @@ struct r600_samplerview_state { struct r600_pipe_sampler_view *views[NUM_TEX_UNITS]; uint32_t enabled_mask; uint32_t dirty_mask; - uint32_t depth_texture_mask; /* which textures are depth */ + uint32_t compressed_depthtex_mask; /* which textures are depth */ }; struct r600_textures_info { @@ -496,14 +496,14 @@ void r600_copy_buffer(struct pipe_context *ctx, struct pipe_resource *dst, unsigned dstx, struct pipe_resource *src, const struct pipe_box *src_box); void r600_init_blit_functions(struct r600_context *rctx); -void r600_blit_uncompress_depth(struct pipe_context *ctx, +void r600_blit_decompress_depth(struct pipe_context *ctx, struct r600_texture *texture, struct r600_texture *staging, unsigned first_level, unsigned last_level, unsigned first_layer, unsigned last_layer, unsigned first_sample, unsigned last_sample); -void r600_flush_depth_textures(struct r600_context *rctx, - struct r600_samplerview_state *textures); +void r600_decompress_depth_textures(struct r600_context *rctx, + struct r600_samplerview_state *textures); /* r600_buffer.c */ bool r600_init_resource(struct r600_screen *rscreen, diff --git a/src/gallium/drivers/r600/r600_resource.h b/src/gallium/drivers/r600/r600_resource.h index 3497ca96636..7beab0fa110 100644 --- a/src/gallium/drivers/r600/r600_resource.h +++ b/src/gallium/drivers/r600/r600_resource.h @@ -51,7 +51,7 @@ struct r600_texture { unsigned tile_type; bool is_depth; bool is_rat; - unsigned dirty_db_mask; /* each bit says if that miplevel is dirty */ + unsigned dirty_level_mask; /* each bit says if that mipmap is compressed */ struct r600_texture *flushed_depth_texture; boolean is_flushing_texture; struct radeon_surface surface; diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 0870cc7e958..5895fefc14d 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -623,9 +623,9 @@ void r600_set_sampler_views(struct pipe_context *pipe, (struct r600_texture*)rviews[i]->base.texture; if (rtex->is_depth && !rtex->is_flushing_texture) { - dst->views.depth_texture_mask |= 1 << i; + dst->views.compressed_depthtex_mask |= 1 << i; } else { - dst->views.depth_texture_mask &= ~(1 << i); + dst->views.compressed_depthtex_mask &= ~(1 << i); } /* Changing from array to non-arrays textures and vice @@ -648,7 +648,7 @@ void r600_set_sampler_views(struct pipe_context *pipe, dst->views.dirty_mask &= dst->views.enabled_mask; dst->views.enabled_mask |= new_mask; dst->views.dirty_mask |= new_mask; - dst->views.depth_texture_mask &= dst->views.enabled_mask; + dst->views.compressed_depthtex_mask &= dst->views.enabled_mask; r600_sampler_views_dirty(rctx, &dst->views); } @@ -1039,12 +1039,12 @@ static void r600_update_derived_state(struct r600_context *rctx) unsigned ps_dirty = 0, blend_override; if (!rctx->blitter->running) { - /* Flush depth textures which need to be flushed. */ - if (rctx->vs_samplers.views.depth_texture_mask) { - r600_flush_depth_textures(rctx, &rctx->vs_samplers.views); + /* Decompress textures if needed. */ + if (rctx->vs_samplers.views.compressed_depthtex_mask) { + r600_decompress_depth_textures(rctx, &rctx->vs_samplers.views); } - if (rctx->ps_samplers.views.depth_texture_mask) { - r600_flush_depth_textures(rctx, &rctx->ps_samplers.views); + if (rctx->ps_samplers.views.compressed_depthtex_mask) { + r600_decompress_depth_textures(rctx, &rctx->ps_samplers.views); } } @@ -1260,7 +1260,7 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *dinfo) struct pipe_surface *surf = rctx->framebuffer.zsbuf; struct r600_texture *rtex = (struct r600_texture *)surf->texture; - rtex->dirty_db_mask |= 1 << surf->u.tex.level; + rtex->dirty_level_mask |= 1 << surf->u.tex.level; } pipe_resource_reference(&ib.buffer, NULL); diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index b9b3ae8323b..90a834ec634 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -517,7 +517,7 @@ struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx, return NULL; } - r600_blit_uncompress_depth(ctx, rtex, staging_depth, + r600_blit_decompress_depth(ctx, rtex, staging_depth, level, level, box->z, box->z + box->depth - 1, 0, 0); |