mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 07:48:07 +02:00
anv/blorp: Flush the texture cache in UpdateBuffer
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit939337e49f) [Andres Gomez: replace anv_state_flush with anv_state_clflush] Signed-off-by: Andres Gomez <agomez@igalia.com> Conflicts: src/intel/vulkan/anv_blorp.c Squashed with commit: anv: blorp: flush memory after copy 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> (cherry picked from commitd71efbe5f2) [Andres Gomez: replace anv_state_flush with anv_state_clflush] Signed-off-by: Andres Gomez <agomez@igalia.com> Conflicts: src/intel/vulkan/anv_blorp.c
This commit is contained in:
parent
a6a42a84cf
commit
c09f729d93
1 changed files with 8 additions and 0 deletions
|
|
@ -683,6 +683,11 @@ 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);
|
||||
|
||||
|
|
@ -691,6 +696,9 @@ void anv_CmdUpdateBuffer(
|
|||
|
||||
memcpy(tmp_data.map, pData, copy_size);
|
||||
|
||||
if (!cmd_buffer->device->info.has_llc)
|
||||
anv_state_clflush(tmp_data);
|
||||
|
||||
int bs = 16;
|
||||
bs = gcd_pow2_u64(bs, dstOffset);
|
||||
bs = gcd_pow2_u64(bs, copy_size);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue