anv: blorp: flush memory after copy
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 17 Apr 2017 21:45:08 +0000 (14:45 -0700)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 17 Apr 2017 21:45:57 +0000 (14:45 -0700)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
src/intel/vulkan/anv_blorp.c

index 257ed9bbcf87e55ef3d85827095340895e981d8d..67cb145a2c6990ec9dbae4970fadff718dcfa288 100644 (file)
@@ -701,10 +701,10 @@ void anv_CmdUpdateBuffer(
       struct anv_state tmp_data =
          anv_cmd_buffer_alloc_dynamic_state(cmd_buffer, copy_size, 64);
 
-      anv_state_flush(cmd_buffer->device, tmp_data);
-
       memcpy(tmp_data.map, pData, copy_size);
 
+      anv_state_flush(cmd_buffer->device, tmp_data);
+
       int bs = 16;
       bs = gcd_pow2_u64(bs, dstOffset);
       bs = gcd_pow2_u64(bs, copy_size);