anv/gpu_memcpy: Rename the gpu_memcpy function
authorNanley Chery <nanley.g.chery@intel.com>
Thu, 11 May 2017 16:37:33 +0000 (09:37 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Mon, 26 Jun 2017 18:09:12 +0000 (11:09 -0700)
A GPU memcpy function could alternatively be implemented using MI_*
commands. Provide more detail into how this one operates in case another
memcpy function is created.

v2:
- Update the commit message.
v3:
- Use 'memcpy' instead of 'cpy' (Jason Ekstrand)
- Shorten 'streamout' to 'so'

Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> (v2)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_genX.h
src/intel/vulkan/genX_cmd_buffer.c
src/intel/vulkan/genX_gpu_memcpy.c

index 67147b0e92b74818bec03b4b768a9dd6132d17b0..8da5e075dc3b3cf2de914715a8255c9206e5be46 100644 (file)
@@ -64,10 +64,10 @@ genX(emit_urb_setup)(struct anv_device *device, struct anv_batch *batch,
                      VkShaderStageFlags active_stages,
                      const unsigned entry_size[4]);
 
-void genX(cmd_buffer_gpu_memcpy)(struct anv_cmd_buffer *cmd_buffer,
-                                 struct anv_bo *dst, uint32_t dst_offset,
-                                 struct anv_bo *src, uint32_t src_offset,
-                                 uint32_t size);
+void genX(cmd_buffer_so_memcpy)(struct anv_cmd_buffer *cmd_buffer,
+                                struct anv_bo *dst, uint32_t dst_offset,
+                                struct anv_bo *src, uint32_t src_offset,
+                                uint32_t size);
 
 void genX(blorp_exec)(struct blorp_batch *batch,
                       const struct blorp_params *params);
index 6a3e525eb3b9db29f448a95270856bafac0e8382..53c58ca5b35e01fe87e18d7a06adfda474ced33e 100644 (file)
@@ -710,9 +710,9 @@ genX(CmdExecuteCommands)(
          struct anv_state dst_state = secondary->state.render_pass_states;
          assert(src_state.alloc_size == dst_state.alloc_size);
 
-         genX(cmd_buffer_gpu_memcpy)(primary, ss_bo, dst_state.offset,
-                                     ss_bo, src_state.offset,
-                                     src_state.alloc_size);
+         genX(cmd_buffer_so_memcpy)(primary, ss_bo, dst_state.offset,
+                                    ss_bo, src_state.offset,
+                                    src_state.alloc_size);
       }
 
       anv_cmd_buffer_add_secondary(primary, secondary);
index 3cbc7235cfc90b07768aa0b2d29316d3da70a0fd..5ef35e628337fe0a0ad82fe61a03eeebeb0c7ce8 100644 (file)
@@ -52,10 +52,10 @@ gcd_pow2_u64(uint64_t a, uint64_t b)
 }
 
 void
-genX(cmd_buffer_gpu_memcpy)(struct anv_cmd_buffer *cmd_buffer,
-                            struct anv_bo *dst, uint32_t dst_offset,
-                            struct anv_bo *src, uint32_t src_offset,
-                            uint32_t size)
+genX(cmd_buffer_so_memcpy)(struct anv_cmd_buffer *cmd_buffer,
+                           struct anv_bo *dst, uint32_t dst_offset,
+                           struct anv_bo *src, uint32_t src_offset,
+                           uint32_t size)
 {
    if (size == 0)
       return;