diff options
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 16 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 23 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state.c | 16 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_texture.c | 12 |
5 files changed, 23 insertions, 46 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index ca835e3af1b..754c265c8c5 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -3739,13 +3739,13 @@ static void evergreen_dma_copy_tile(struct r600_context *rctx, } } -boolean evergreen_dma_blit(struct pipe_context *ctx, - struct pipe_resource *dst, - unsigned dst_level, - unsigned dst_x, unsigned dst_y, unsigned dst_z, - struct pipe_resource *src, - unsigned src_level, - const struct pipe_box *src_box) +static boolean evergreen_dma_blit(struct pipe_context *ctx, + struct pipe_resource *dst, + unsigned dst_level, + unsigned dst_x, unsigned dst_y, unsigned dst_z, + struct pipe_resource *src, + unsigned src_level, + const struct pipe_box *src_box) { struct r600_context *rctx = (struct r600_context *)ctx; struct r600_texture *rsrc = (struct r600_texture*)src; @@ -3904,5 +3904,7 @@ void evergreen_init_state_functions(struct r600_context *rctx) rctx->b.b.get_sample_position = evergreen_get_sample_position; else rctx->b.b.get_sample_position = cayman_get_sample_position; + rctx->b.dma_copy = evergreen_dma_blit; + evergreen_init_compute_state_functions(rctx); } diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index dfe78b93a71..d9f2ed2dc01 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -1290,10 +1290,8 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws) if (rscreen->b.chip_class >= EVERGREEN) { rscreen->b.b.is_format_supported = evergreen_is_format_supported; - rscreen->dma_blit = &evergreen_dma_blit; } else { rscreen->b.b.is_format_supported = r600_is_format_supported; - rscreen->dma_blit = &r600_dma_blit; } rscreen->b.b.context_create = r600_create_context; rscreen->b.b.fence_reference = r600_fence_reference; diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index fc138605e8c..f41c0b58088 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -201,14 +201,6 @@ struct r600_pipe_fences { pipe_mutex mutex; }; -typedef boolean (*r600g_dma_blit_t)(struct pipe_context *ctx, - struct pipe_resource *dst, - unsigned dst_level, - unsigned dst_x, unsigned dst_y, unsigned dst_z, - struct pipe_resource *src, - unsigned src_level, - const struct pipe_box *src_box); - /* logging */ #define DBG_TEX_DEPTH (1 << 0) #define DBG_COMPUTE (1 << 1) @@ -260,7 +252,6 @@ struct r600_screen { struct r600_resource *trace_bo; uint32_t *trace_ptr; unsigned cs_count; - r600g_dma_blit_t dma_blit; /* Auxiliary context. Mainly used to initialize resources. * It must be locked prior to using and flushed before unlocking. */ @@ -739,13 +730,6 @@ void r600_dma_copy(struct r600_context *rctx, uint64_t dst_offset, uint64_t src_offset, uint64_t size); -boolean r600_dma_blit(struct pipe_context *ctx, - struct pipe_resource *dst, - unsigned dst_level, - unsigned dst_x, unsigned dst_y, unsigned dst_z, - struct pipe_resource *src, - unsigned src_level, - const struct pipe_box *src_box); void r600_flag_resource_cache_flush(struct r600_context *rctx, struct pipe_resource *res); @@ -758,13 +742,6 @@ void evergreen_dma_copy(struct r600_context *rctx, uint64_t dst_offset, uint64_t src_offset, uint64_t size); -boolean evergreen_dma_blit(struct pipe_context *ctx, - struct pipe_resource *dst, - unsigned dst_level, - unsigned dst_x, unsigned dst_y, unsigned dst_z, - struct pipe_resource *src, - unsigned src_level, - const struct pipe_box *src_box); /* r600_state_common.c */ void r600_init_common_state_functions(struct r600_context *rctx); diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 5411f743a63..36ceb8336e2 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -3119,13 +3119,13 @@ static boolean r600_dma_copy_tile(struct r600_context *rctx, return TRUE; } -boolean r600_dma_blit(struct pipe_context *ctx, - struct pipe_resource *dst, - unsigned dst_level, - unsigned dst_x, unsigned dst_y, unsigned dst_z, - struct pipe_resource *src, - unsigned src_level, - const struct pipe_box *src_box) +static boolean r600_dma_blit(struct pipe_context *ctx, + struct pipe_resource *dst, + unsigned dst_level, + unsigned dst_x, unsigned dst_y, unsigned dst_z, + struct pipe_resource *src, + unsigned src_level, + const struct pipe_box *src_box) { struct r600_context *rctx = (struct r600_context *)ctx; struct r600_texture *rsrc = (struct r600_texture*)src; @@ -3263,7 +3263,7 @@ void r600_init_state_functions(struct r600_context *rctx) rctx->b.b.set_framebuffer_state = r600_set_framebuffer_state; rctx->b.b.set_polygon_stipple = r600_set_polygon_stipple; rctx->b.b.set_scissor_states = r600_set_scissor_states; - rctx->b.b.get_sample_position = r600_get_sample_position; + rctx->b.dma_copy = r600_dma_blit; } /* this function must be last */ diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index a86e4c91be8..508340826e7 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -81,9 +81,9 @@ static void r600_copy_to_staging_texture(struct pipe_context *ctx, struct r600_t return; } - if (!rctx->screen->dma_blit(ctx, dst, 0, 0, 0, 0, - src, transfer->level, - &transfer->box)) { + if (!rctx->b.dma_copy(ctx, dst, 0, 0, 0, 0, + src, transfer->level, + &transfer->box)) { ctx->resource_copy_region(ctx, dst, 0, 0, 0, 0, src, transfer->level, &transfer->box); } @@ -107,9 +107,9 @@ static void r600_copy_from_staging_texture(struct pipe_context *ctx, struct r600 return; } - if (!rctx->screen->dma_blit(ctx, dst, transfer->level, - transfer->box.x, transfer->box.y, transfer->box.z, - src, 0, &sbox)) { + if (!rctx->b.dma_copy(ctx, dst, transfer->level, + transfer->box.x, transfer->box.y, transfer->box.z, + src, 0, &sbox)) { ctx->resource_copy_region(ctx, dst, transfer->level, transfer->box.x, transfer->box.y, transfer->box.z, src, 0, &sbox); |