Fixes:
3df9d8ed807 - gallium/u_threaded: implement pipelined partial buffer uploads using CPU storage
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6837
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6594
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6613
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17556>
tc_buffer_do_flush_region(tc, ttrans, &box);
}
- /* Staging transfers don't send the call to the driver. */
- if (ttrans->staging)
+ /* Staging transfers don't send the call to the driver.
+ *
+ * Transfers using the CPU storage shouldn't call transfer_flush_region
+ * in the driver because the buffer is not really mapped on the driver
+ * side and the CPU storage always re-uploads everything (flush_region
+ * makes no difference).
+ */
+ if (ttrans->staging || ttrans->cpu_storage_mapped)
return;
}