On Tue, May 02, 2017 at 04:58:15PM -0700, Jason Ekstrand wrote: > On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery <nanleych...@gmail.com> > wrote: > > > We're now performing a GPU memcpy in more places to copy small amounts > > of data. Add a path to thrash less state. > > > > Signed-off-by: Nanley Chery <nanley.g.ch...@intel.com> > > --- > > src/intel/vulkan/genX_gpu_memcpy.c | 38 ++++++++++++++++++++++++++++++ > > ++++++++ > > 1 file changed, 38 insertions(+) > > > > diff --git a/src/intel/vulkan/genX_gpu_memcpy.c > > b/src/intel/vulkan/genX_gpu_memcpy.c > > index 3cbc7235cf..f15c2a5f72 100644 > > --- a/src/intel/vulkan/genX_gpu_memcpy.c > > +++ b/src/intel/vulkan/genX_gpu_memcpy.c > > @@ -28,6 +28,8 @@ > > > > #include "common/gen_l3_config.h" > > > > +#define MI_PREDICATE_SRC0 0x2400 > > + > > /** > > * This file implements some lightweight memcpy/memset operations on the > > GPU > > * using a vertex buffer and streamout. > > @@ -63,6 +65,42 @@ genX(cmd_buffer_gpu_memcpy)(struct anv_cmd_buffer > > *cmd_buffer, > > assert(dst_offset + size <= dst->size); > > assert(src_offset + size <= src->size); > > > > + /* This memcpy expects DWord aligned memory. */ > > + assert(size % 4 == 0); > > + assert(dst_offset % 4 == 0); > > + assert(src_offset % 4 == 0); > > + > > + /* Use a simpler memcpy operation when copying 16 bytes or less of > > data. > > + * This is the size of a surface state's clear value on SKL+. > > + */ > > > > I think I would rather just have a separate function. Why? Because these > two methods have very different characteristics in terms of what state they > trash (quite a bit vs. none) and how they perform. I'd rather we be > explicit about which method we use. Feel free to rename > cmd_buffer_gpu_memcpy to cmd_buffer_streamout_copy and then you can name > the other cmd_buffer_mem_mem_copy or similar. > >
Fixed in local v2. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev