mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-05 19:28:18 +02:00
iris: Use staging blits for reads from uncached buffers.
If we're doing CPU reads of a resource that doesn't have CPU caches enabled for the mapping (say, in device local memory, or WC mapped), then blit it to a temporary that does have those caches enabled. Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10941>
This commit is contained in:
parent
49070038f4
commit
643c4ade4c
1 changed files with 5 additions and 1 deletions
|
|
@ -2069,8 +2069,12 @@ iris_transfer_map(struct pipe_context *ctx,
|
|||
if (fmtl->txc == ISL_TXC_ASTC)
|
||||
usage |= PIPE_MAP_DIRECTLY;
|
||||
|
||||
/* We can map directly if it wouldn't stall, there's no compression,
|
||||
* and we aren't doing an uncached read.
|
||||
*/
|
||||
if (!map_would_stall &&
|
||||
!isl_aux_usage_has_compression(res->aux.usage)) {
|
||||
!isl_aux_usage_has_compression(res->aux.usage) &&
|
||||
!((usage & PIPE_MAP_READ) && !res->bo->cache_coherent)) {
|
||||
usage |= PIPE_MAP_DIRECTLY;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue