Mesa (master): iris: Better determine map_would_stall for Z/S
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Sep 4 15:36:34 UTC 2020
Module: Mesa
Branch: master
Commit: efd439e0d648c90ae5854a0e83cd864836864e91
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=efd439e0d648c90ae5854a0e83cd864836864e91
Author: Nanley Chery <nanley.g.chery at intel.com>
Date: Tue Jun 23 10:23:12 2020 -0700
iris: Better determine map_would_stall for Z/S
Use iris_has_invalid_primary to determine if mapping a depth or stencil
surface would lead to a stall due to resolving.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6192>
---
src/gallium/drivers/iris/iris_resource.c | 21 +++------------------
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index b358f0c1ec5..bfd79603ee8 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -1788,27 +1788,12 @@ iris_transfer_map(struct pipe_context *ctx,
usage |= PIPE_TRANSFER_UNSYNCHRONIZED;
}
- bool need_resolve = false;
-
- if (resource->target != PIPE_BUFFER) {
- bool need_hiz_resolve = iris_resource_level_has_hiz(res, level);
- bool need_stencil_resolve = res->aux.usage == ISL_AUX_USAGE_STC_CCS;
-
- bool need_color_resolve =
- (res->aux.usage == ISL_AUX_USAGE_CCS_D ||
- res->aux.usage == ISL_AUX_USAGE_CCS_E ||
- res->aux.usage == ISL_AUX_USAGE_GEN12_CCS_E) &&
- iris_has_invalid_primary(res, level, 1, box->z, box->depth);
-
- need_resolve = need_color_resolve ||
- need_hiz_resolve ||
- need_stencil_resolve;
- }
-
bool map_would_stall = false;
if (!(usage & PIPE_TRANSFER_UNSYNCHRONIZED)) {
- map_would_stall = need_resolve || resource_is_busy(ice, res);
+ map_would_stall =
+ resource_is_busy(ice, res) ||
+ iris_has_invalid_primary(res, level, 1, box->z, box->depth);
if (map_would_stall && (usage & PIPE_TRANSFER_DONTBLOCK) &&
(usage & PIPE_TRANSFER_MAP_DIRECTLY))
More information about the mesa-commit
mailing list