rctx->family == CHIP_RV620 || rctx->family == CHIP_RV635)
depth = 0.0f;
+ if (rctx->chip_class <= R700 &&
+ !rctx->db_misc_state.flush_depthstencil_through_cb) {
+ /* Enable decompression in DB_RENDER_CONTROL */
+ rctx->db_misc_state.flush_depthstencil_through_cb = true;
+ r600_atom_dirty(rctx, &rctx->db_misc_state.atom);
+ }
+
for (level = 0; level <= texture->resource.b.b.last_level; level++) {
unsigned num_layers = u_num_layers(&texture->resource.b.b, level);
if (!staging)
texture->dirty_db = FALSE;
+
+ if (rctx->chip_class <= R700) {
+ /* Disable decompression in DB_RENDER_CONTROL */
+ rctx->db_misc_state.flush_depthstencil_through_cb = false;
+ r600_atom_dirty(rctx, &rctx->db_misc_state.atom);
+ }
}
void r600_flush_depth_textures(struct r600_context *rctx)
struct r600_db_misc_state {
struct r600_atom atom;
bool occlusion_query_enabled;
- bool flush_depthstencil_enabled;
+ bool flush_depthstencil_through_cb;
};
struct r600_cb_misc_state {
unsigned alpha_ref;
ubyte valuemask[2];
ubyte writemask[2];
- bool is_flush;
unsigned sx_alpha_test_control;
};
}
db_render_override |= S_028D10_NOOP_CULL_DISABLE(1);
}
- if (a->flush_depthstencil_enabled) {
+ if (a->flush_depthstencil_through_cb) {
db_render_control |= S_028D0C_DEPTH_COPY_ENABLE(1) |
S_028D0C_STENCIL_COPY_ENABLE(1) |
S_028D0C_COPY_CENTROID(1);
void *r600_create_db_flush_dsa(struct r600_context *rctx)
{
struct pipe_depth_stencil_alpha_state dsa;
- struct r600_pipe_state *rstate;
- struct r600_pipe_dsa *dsa_state;
boolean quirk = false;
if (rctx->family == CHIP_RV610 || rctx->family == CHIP_RV630 ||
dsa.stencil[0].writemask = 0xff;
}
- rstate = rctx->context.create_depth_stencil_alpha_state(&rctx->context, &dsa);
- dsa_state = (struct r600_pipe_dsa*)rstate;
- dsa_state->is_flush = true;
- return rstate;
+ return rctx->context.create_depth_stencil_alpha_state(&rctx->context, &dsa);
}
void r600_update_dual_export_state(struct r600_context * rctx)
ref.writemask[1] = dsa->writemask[1];
r600_set_stencil_ref(ctx, &ref);
-
- if (rctx->db_misc_state.flush_depthstencil_enabled != dsa->is_flush) {
- rctx->db_misc_state.flush_depthstencil_enabled = dsa->is_flush;
- r600_atom_dirty(rctx, &rctx->db_misc_state.atom);
- }
}
void r600_set_max_scissor(struct r600_context *rctx)