diff options
author | Marek Olšák <[email protected]> | 2011-09-17 14:10:20 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-09-30 23:19:52 +0200 |
commit | 90ce3cdde9fb2dd507b4e21c5456a3371f5996bc (patch) | |
tree | fe7d128c2cd9efaeba3f93614bd4cc124a43aadb /src/gallium/drivers/r600 | |
parent | 518557d74abd4ce035dae079ff6eb1b08cc639d0 (diff) |
r600g: remove struct radeon (or what's left of it)
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/r600.h | 9 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 18 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 2 |
3 files changed, 5 insertions, 24 deletions
diff --git a/src/gallium/drivers/r600/r600.h b/src/gallium/drivers/r600/r600.h index d7b979b1b66..f35fb172849 100644 --- a/src/gallium/drivers/r600/r600.h +++ b/src/gallium/drivers/r600/r600.h @@ -38,7 +38,6 @@ typedef uint32_t u32; typedef uint16_t u16; typedef uint8_t u8; -struct radeon; struct winsys_handle; enum radeon_family { @@ -203,7 +202,6 @@ struct r600_query { #define R600_CONTEXT_CHECK_EVENT_FLUSH (1 << 2) struct r600_context { - struct radeon *radeon; struct r600_screen *screen; struct radeon_winsys_cs *cs; @@ -248,7 +246,7 @@ struct r600_draw { }; void r600_get_backend_mask(struct r600_context *ctx); -int r600_context_init(struct r600_context *ctx, struct r600_screen *screen, struct radeon *radeon); +int r600_context_init(struct r600_context *ctx, struct r600_screen *screen); void r600_context_fini(struct r600_context *ctx); void r600_context_pipe_state_set(struct r600_context *ctx, struct r600_pipe_state *state); void r600_context_pipe_state_set_ps_resource(struct r600_context *ctx, struct r600_pipe_resource_state *state, unsigned rid); @@ -275,7 +273,7 @@ void r600_context_emit_fence(struct r600_context *ctx, struct r600_resource *fen void r600_context_flush_all(struct r600_context *ctx, unsigned flush_flags); void r600_context_flush_dest_caches(struct r600_context *ctx); -int evergreen_context_init(struct r600_context *ctx, struct r600_screen *screen, struct radeon *radeon); +int evergreen_context_init(struct r600_context *ctx, struct r600_screen *screen); void evergreen_context_draw(struct r600_context *ctx, const struct r600_draw *draw); void evergreen_context_flush_dest_caches(struct r600_context *ctx); void evergreen_context_pipe_state_set_ps_resource(struct r600_context *ctx, struct r600_pipe_resource_state *state, unsigned rid); @@ -284,9 +282,6 @@ void evergreen_context_pipe_state_set_fs_resource(struct r600_context *ctx, stru void evergreen_context_pipe_state_set_ps_sampler(struct r600_context *ctx, struct r600_pipe_state *state, unsigned id); void evergreen_context_pipe_state_set_vs_sampler(struct r600_context *ctx, struct r600_pipe_state *state, unsigned id); -struct radeon *radeon_create(struct radeon_winsys *ws); -void radeon_destroy(struct radeon *radeon); - void _r600_pipe_state_add_reg(struct r600_context *ctx, struct r600_pipe_state *state, u32 offset, u32 value, u32 mask, diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 3838c0f9b9f..73c2b333031 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -213,7 +213,6 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void /* Easy accessing of screen/winsys. */ rctx->screen = rscreen; rctx->ws = rscreen->ws; - rctx->radeon = rscreen->radeon; rctx->family = rscreen->family; rctx->chip_class = rscreen->chip_class; @@ -236,7 +235,7 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void case R600: case R700: r600_init_state_functions(rctx); - if (r600_context_init(&rctx->ctx, rctx->screen, rctx->radeon)) { + if (r600_context_init(&rctx->ctx, rctx->screen)) { r600_destroy_context(&rctx->context); return NULL; } @@ -246,7 +245,7 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void case EVERGREEN: case CAYMAN: evergreen_init_state_functions(rctx); - if (evergreen_context_init(&rctx->ctx, rctx->screen, rctx->radeon)) { + if (evergreen_context_init(&rctx->ctx, rctx->screen)) { r600_destroy_context(&rctx->context); return NULL; } @@ -524,7 +523,6 @@ static void r600_destroy_screen(struct pipe_screen* pscreen) if (rscreen == NULL) return; - radeon_destroy(rscreen->radeon); rscreen->ws->destroy(rscreen->ws); util_slab_destroy(&rscreen->pool_buffers); @@ -712,26 +710,17 @@ static unsigned radeon_family_from_device(unsigned device) struct pipe_screen *r600_screen_create(struct radeon_winsys *ws) { - struct r600_screen *rscreen; - struct radeon *radeon = radeon_create(ws); - if (!radeon) { - return NULL; - } - - rscreen = CALLOC_STRUCT(r600_screen); + struct r600_screen *rscreen = CALLOC_STRUCT(r600_screen); if (rscreen == NULL) { - radeon_destroy(radeon); return NULL; } rscreen->ws = ws; - rscreen->radeon = radeon; ws->query_info(ws, &rscreen->info); rscreen->family = radeon_family_from_device(rscreen->info.pci_id); if (rscreen->family == CHIP_UNKNOWN) { fprintf(stderr, "r600: Unknown chipset 0x%04X\n", rscreen->info.pci_id); - radeon_destroy(radeon); FREE(rscreen); return NULL; } @@ -748,7 +737,6 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws) } if (r600_init_tiling(rscreen)) { - radeon_destroy(radeon); FREE(rscreen); return NULL; } diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index c0cd3b32460..0ef96be2832 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -75,7 +75,6 @@ enum r600_pipe_state_id { struct r600_screen { struct pipe_screen screen; struct radeon_winsys *ws; - struct radeon *radeon; unsigned family; enum chip_class chip_class; struct radeon_info info; @@ -188,7 +187,6 @@ struct r600_pipe_context { void *custom_dsa_flush; struct r600_screen *screen; struct radeon_winsys *ws; - struct radeon *radeon; struct r600_pipe_state *states[R600_PIPE_NSTATES]; struct r600_context ctx; struct r600_vertex_element *vertex_elements; |