iris: Rework iris_transfer_mapto better use iris_has_color_unresolved
The following discussion from !4056 (merged) should be addressed:
-
@nchery started a discussion: (+3 comments) I wonder if we're regressing performance relative to when stencil was CCS_E. This function does some extra leg-work for CCS_E textures: using
iris_has_color_unresolved
, and the following block:if ((map_would_stall || res->aux.usage == ISL_AUX_USAGE_CCS_E) && !no_gpu) { /* If we need a synchronous mapping and the resource is busy, or needs * resolving, we copy to/from a linear temporary buffer using the GPU. */ map->batch = &ice->batches[IRIS_BATCH_RENDER]; map->blorp = &ice->blorp; iris_map_copy_region(map); } else {
@jekstrand said:
In theory, maybe. In practice, no one seriously maps stencil buffers. Also, this whole function's handling of compression feels a bit dubious to me. We should probably just make
iris_has_color_unresolved
work for non-color things (would be trivial) and not make depth/stencil special except for the fact that HiZ's resolve isn't as destructive (I think it's still a little destructive) which we can model with anisl_aux_usage_full_resolves_ambiguate
helper.