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,
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 ||
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
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);
}
}
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;
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));
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);
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));
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 {
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,
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;
(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
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);
}
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);
}
}
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);
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);