int r600_blit_uncompress_depth(struct pipe_context *ctx, struct r600_resource_texture *texture)
{
struct r600_context *rctx = r600_context(ctx);
- struct r600_screen *rscreen = rctx->screen;
- struct pipe_framebuffer_state *fb = &rctx->framebuffer->state.framebuffer;
+ struct pipe_framebuffer_state *fb = rctx->pframebuffer;
struct pipe_surface *zsurf, *cbsurf;
- enum radeon_family family;
int level = 0;
float depth = 1.0f;
r600_blitter_save_states(ctx);
util_blitter_save_framebuffer(rctx->blitter, fb);
- family = radeon_get_family(rscreen->rw);
- if (family == CHIP_RV610 || family == CHIP_RV630 || family == CHIP_RV620 ||
- family == CHIP_RV635)
+ if (rctx->family == CHIP_RV610 || rctx->family == CHIP_RV630 ||
+ rctx->family == CHIP_RV620 || rctx->family == CHIP_RV635)
depth = 0.0f;
-
+
util_blitter_custom_depth_stencil(rctx->blitter, zsurf, cbsurf, rctx->custom_dsa_flush, depth);
/* resume queries */
struct r600_context {
struct pipe_context context;
+ struct blitter_context *blitter;
+ struct pipe_framebuffer_state *pframebuffer;
+ unsigned family;
+ void *custom_dsa_flush;
+ struct list_head query_list;
struct r600_screen *screen;
struct radeon *rw;
struct radeon_ctx *ctx;
- struct blitter_context *blitter;
struct radeon_draw draw;
struct r600_context_hw_state_vtbl *vtbl;
struct radeon_state config;
struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
struct pipe_index_buffer index_buffer;
struct pipe_blend_color blend_color;
- struct list_head query_list;
/* upload managers */
struct u_upload_mgr *upload_vb;
struct u_upload_mgr *upload_ib;
bool any_user_vbs;
-
- void *custom_dsa_flush;
};
/* Convenience cast wrapper. */
}
clean_flush(rctx, &rctx->hw_states.cb_flush);
clean_flush(rctx, &rctx->hw_states.db_flush);
-
+ rctx->pframebuffer = NULL;
r600_context_state_decref(rctx->framebuffer);
rstate = r600_new_context_state(pipe_framebuffer_type);
}
pipe_reference(NULL, &state->zsbuf->reference);
rctx->framebuffer = rstate;
+ rctx->pframebuffer = &rstate->state.framebuffer;
for (i = 0; i < state->nr_cbufs; i++) {
rctx->vtbl->cb(rctx, &rstate->rstate[i+1], state, i);
}