diff options
author | Marek Olšák <[email protected]> | 2012-08-26 22:38:35 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-08-30 19:43:56 +0200 |
commit | 78354011f99c4103345f8f32e10b0b4b884ebdaf (patch) | |
tree | 0686495ce07db652b88bed43a4f421e4077d5545 /src/gallium/drivers/r600/r600_pipe.c | |
parent | 863e2c85b9c59d717ad786c709638d948ff0f38e (diff) |
r600g: implement color resolve for r600
The blend state is different and the resolve single-sample buffer must have
FMASK and CMASK enabled. I decided to have one CMASK and one FMASK
per context instead of per resource.
There are new FMASK and CMASK allocation helpers and a new buffer_create
helper for that.
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 77adeaef8bc..7856e624ea2 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -156,6 +156,9 @@ static void r600_destroy_context(struct pipe_context *context) { struct r600_context *rctx = (struct r600_context *)context; + pipe_resource_reference((struct pipe_resource**)&rctx->dummy_cmask, NULL); + pipe_resource_reference((struct pipe_resource**)&rctx->dummy_fmask, NULL); + if (rctx->no_blend) { rctx->context.delete_blend_state(&rctx->context, rctx->no_blend); } @@ -250,7 +253,8 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void if (r600_context_init(rctx)) goto fail; rctx->custom_dsa_flush = r600_create_db_flush_dsa(rctx); - rctx->custom_blend_resolve = r600_create_resolve_blend(rctx); + rctx->custom_blend_resolve = rctx->chip_class == R700 ? r700_create_resolve_blend(rctx) + : r600_create_resolve_blend(rctx); rctx->custom_blend_decompress = r600_create_decompress_blend(rctx); rctx->has_vertex_cache = !(rctx->family == CHIP_RV610 || rctx->family == CHIP_RV620 || |