*_dma_copy calls either *_dma_copy_buffer or *_dma_copy_tile.
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
#include "util/u_memory.h"
#include "util/u_math.h"
-void evergreen_dma_copy(struct r600_context *rctx,
- struct pipe_resource *dst,
- struct pipe_resource *src,
- uint64_t dst_offset,
- uint64_t src_offset,
- uint64_t size)
+void evergreen_dma_copy_buffer(struct r600_context *rctx,
+ struct pipe_resource *dst,
+ struct pipe_resource *src,
+ uint64_t dst_offset,
+ uint64_t src_offset,
+ uint64_t size)
{
struct radeon_winsys_cs *cs = rctx->b.rings.dma.cs;
unsigned i, ncopy, csize, sub_cmd, shift;
}
}
-static void evergreen_dma_blit(struct pipe_context *ctx,
+static void evergreen_dma_copy(struct pipe_context *ctx,
struct pipe_resource *dst,
unsigned dst_level,
unsigned dstx, unsigned dsty, unsigned dstz,
}
if (dst->target == PIPE_BUFFER && src->target == PIPE_BUFFER) {
- evergreen_dma_copy(rctx, dst, src, dst_x, src_box->x, src_box->width);
+ evergreen_dma_copy_buffer(rctx, dst, src, dst_x, src_box->x, src_box->width);
return;
}
dst_offset = rdst->surface.level[dst_level].offset;
dst_offset += rdst->surface.level[dst_level].slice_size * dst_z;
dst_offset += dst_y * dst_pitch + dst_x * bpp;
- evergreen_dma_copy(rctx, dst, src, dst_offset, src_offset,
+ evergreen_dma_copy_buffer(rctx, dst, src, dst_offset, src_offset,
src_box->height * src_pitch);
} else {
evergreen_dma_copy_tile(rctx, dst, dst_level, dst_x, dst_y, dst_z,
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;
+ rctx->b.dma_copy = evergreen_dma_copy;
evergreen_init_compute_state_functions(rctx);
}
R600_CONTEXT_INV_TEX_CACHE;
}
-void r600_dma_copy(struct r600_context *rctx,
- struct pipe_resource *dst,
- struct pipe_resource *src,
- uint64_t dst_offset,
- uint64_t src_offset,
- uint64_t size)
+void r600_dma_copy_buffer(struct r600_context *rctx,
+ struct pipe_resource *dst,
+ struct pipe_resource *src,
+ uint64_t dst_offset,
+ uint64_t src_offset,
+ uint64_t size)
{
struct radeon_winsys_cs *cs = rctx->b.rings.dma.cs;
unsigned i, ncopy, csize;
void evergreen_cp_dma_clear_buffer(struct r600_context *rctx,
struct pipe_resource *dst, uint64_t offset,
unsigned size, uint32_t clear_value);
-void r600_dma_copy(struct r600_context *rctx,
- struct pipe_resource *dst,
- struct pipe_resource *src,
- uint64_t dst_offset,
- uint64_t src_offset,
- uint64_t size);
+void r600_dma_copy_buffer(struct r600_context *rctx,
+ struct pipe_resource *dst,
+ struct pipe_resource *src,
+ uint64_t dst_offset,
+ uint64_t src_offset,
+ uint64_t size);
/*
* evergreen_hw_context.c
*/
-void evergreen_dma_copy(struct r600_context *rctx,
- struct pipe_resource *dst,
- struct pipe_resource *src,
- uint64_t dst_offset,
- uint64_t src_offset,
- uint64_t size);
+void evergreen_dma_copy_buffer(struct r600_context *rctx,
+ struct pipe_resource *dst,
+ struct pipe_resource *src,
+ uint64_t dst_offset,
+ uint64_t src_offset,
+ uint64_t size);
/* r600_state_common.c */
void r600_init_common_state_functions(struct r600_context *rctx);
return TRUE;
}
-static void r600_dma_blit(struct pipe_context *ctx,
+static void r600_dma_copy(struct pipe_context *ctx,
struct pipe_resource *dst,
unsigned dst_level,
unsigned dstx, unsigned dsty, unsigned dstz,
if (dst_x % 4 || src_box->x % 4 || src_box->width % 4)
goto fallback;
- r600_dma_copy(rctx, dst, src, dst_x, src_box->x, src_box->width);
+ r600_dma_copy_buffer(rctx, dst, src, dst_x, src_box->x, src_box->width);
return;
}
if (dst_offset % 4 || src_offset % 4 || size % 4) {
goto fallback;
}
- r600_dma_copy(rctx, dst, src, dst_offset, src_offset, size);
+ r600_dma_copy_buffer(rctx, dst, src, dst_offset, src_offset, size);
} else {
if (!r600_dma_copy_tile(rctx, dst, dst_level, dst_x, dst_y, dst_z,
src, src_level, src_x, src_y, src_box->z,
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;
+ rctx->b.dma_copy = r600_dma_copy;
}
/* this function must be last */