diff options
author | Jason Ekstrand <[email protected]> | 2017-03-31 15:33:51 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-04-14 13:35:02 -0700 |
commit | 939337e49fb8a6e16f83e4e030743f91b1b05cc5 (patch) | |
tree | 2b4ef5fd31111b7b5bc21ef1a8160c15bf09a6cd | |
parent | 475bab0330fd947db0e9a67771632e0da5631030 (diff) |
anv/blorp: Flush the texture cache in UpdateBuffer
Reviewed-by: Lionel Landwerlin <[email protected]>
Cc: "13.0 17.0" <[email protected]>
-rw-r--r-- | src/intel/vulkan/anv_blorp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index 4904ee3a5fc..1755663e2ac 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src/intel/vulkan/anv_blorp.c @@ -690,12 +690,19 @@ void anv_CmdUpdateBuffer( assert(max_update_size < MAX_SURFACE_DIM * 4); + /* We're about to read data that was written from the CPU. Flush the + * texture cache so we don't get anything stale. + */ + cmd_buffer->state.pending_pipe_bits |= ANV_PIPE_TEXTURE_CACHE_INVALIDATE_BIT; + while (dataSize) { const uint32_t copy_size = MIN2(dataSize, max_update_size); 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); int bs = 16; |