r600g: use more appropriate names for async DMA functions
authorMarek Olšák <marek.olsak@amd.com>
Mon, 17 Mar 2014 00:19:51 +0000 (01:19 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 20 Mar 2014 18:03:40 +0000 (19:03 +0100)
*_dma_copy calls either *_dma_copy_buffer or *_dma_copy_tile.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/r600/evergreen_hw_context.c
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_hw_context.c
src/gallium/drivers/r600/r600_pipe.h
src/gallium/drivers/r600/r600_state.c

index a47461c20ea743bbad4d98c6e86dc17464a807f7..f95a17e87b1cf3e13805fb68b6f3563fa17fc28b 100644 (file)
 #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;
index 11cd76772af9e377c4383b16f107b85331c0ca9c..50d959e318c34e9d76cc07acf7f85a418aad4da6 100644 (file)
@@ -3322,7 +3322,7 @@ static void evergreen_dma_copy_tile(struct r600_context *rctx,
        }
 }
 
-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,
@@ -3343,7 +3343,7 @@ static void evergreen_dma_blit(struct pipe_context *ctx,
        }
 
        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;
        }
 
@@ -3409,7 +3409,7 @@ static void evergreen_dma_blit(struct pipe_context *ctx,
                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,
@@ -3506,7 +3506,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;
+       rctx->b.dma_copy = evergreen_dma_copy;
 
        evergreen_init_compute_state_functions(rctx);
 }
index 267b326a511958e32ae1fc55ddceb9b45b6a083b..1884412cb29edfb119c5b6d023d41ded2a22abc6 100644 (file)
@@ -440,12 +440,12 @@ void r600_cp_dma_copy_buffer(struct r600_context *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;
index 0472eaa7d04dca2ccaa7b16542aea973905c026f..0a3fa42c27cea1968aa53eb1fec021dee96ccc6e 100644 (file)
@@ -593,22 +593,22 @@ void r600_cp_dma_copy_buffer(struct r600_context *rctx,
 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);
index d87caf896697487432f44f6eeb261923e81f6296..8053ff43ba882444f2e885e4201da7a0740f0df6 100644 (file)
@@ -2879,7 +2879,7 @@ static boolean r600_dma_copy_tile(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,
@@ -2903,7 +2903,7 @@ static void r600_dma_blit(struct pipe_context *ctx,
                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;
        }
 
@@ -2957,7 +2957,7 @@ static void r600_dma_blit(struct pipe_context *ctx,
                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,
@@ -3050,6 +3050,6 @@ void r600_init_state_functions(struct r600_context *rctx)
        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 */