anv/so_memcpy: Use the correct SO_BUFFER size on gen8+
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 10 Sep 2018 21:37:17 +0000 (16:37 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 15 Sep 2018 03:12:11 +0000 (22:12 -0500)
This shouldn't matter as we'll never write OOB anyway but we may as well
get it right.  It's supposed to be in dwords - 1.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
src/intel/vulkan/genX_gpu_memcpy.c

index eaafcfa3b226ff36ca8eb46ada1675fcf0e31585..a8e99d1a69528f061147f6f7c09f45ee6a1e6780 100644 (file)
@@ -224,7 +224,7 @@ genX(cmd_buffer_so_memcpy)(struct anv_cmd_buffer *cmd_buffer,
 
 #if GEN_GEN >= 8
       sob.SOBufferEnable = true;
-      sob.SurfaceSize = size - 1;
+      sob.SurfaceSize = size / 4 - 1;
 #else
       sob.SurfacePitch = bs;
       sob.SurfaceEndAddress = sob.SurfaceBaseAddress;