mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01: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>
This commit is contained in:
parent
475bab0330
commit
939337e49f
1 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue