diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r600/r600_blit.c | 11 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_context.h | 9 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state.c | 3 |
3 files changed, 11 insertions, 12 deletions
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c index c30a7c187c9..52326534e6e 100644 --- a/src/gallium/drivers/r600/r600_blit.c +++ b/src/gallium/drivers/r600/r600_blit.c @@ -180,10 +180,8 @@ void r600_init_blit_functions(struct r600_context *rctx) 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; @@ -196,11 +194,10 @@ int r600_blit_uncompress_depth(struct pipe_context *ctx, struct r600_resource_te 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 */ diff --git a/src/gallium/drivers/r600/r600_context.h b/src/gallium/drivers/r600/r600_context.h index aec0dab338c..d104531d365 100644 --- a/src/gallium/drivers/r600/r600_context.h +++ b/src/gallium/drivers/r600/r600_context.h @@ -198,10 +198,14 @@ extern struct r600_context_hw_state_vtbl eg_hw_state_vtbl; 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; @@ -238,14 +242,11 @@ struct r600_context { 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. */ diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 424f7a8913f..791b39a001e 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -389,7 +389,7 @@ static void r600_set_framebuffer_state(struct pipe_context *ctx, } 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); @@ -399,6 +399,7 @@ static void r600_set_framebuffer_state(struct pipe_context *ctx, } 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); } |