Mesa (master): iris: Fix CCS check in iris_texture_subdata().
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jul 21 09:21:21 UTC 2020
Module: Mesa
Branch: master
Commit: 576c53dadf3f60bc363a39e85625afb67a2cbb8d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=576c53dadf3f60bc363a39e85625afb67a2cbb8d
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Mon Jul 20 17:08:46 2020 -0700
iris: Fix CCS check in iris_texture_subdata().
The intention here was to check "Would the GPU be able to compress
this if we used the PBO-based texture upload path?" Prior to Gen12,
that meant checking for CCS_E. On Gen12, there are a lot more types
of compression, and basic CCS_E was replaced by GEN12_CCS_E, making
this check simply not work, so we'd take the CPU path instead.
Instead, check if it has CCS, and isn't the basic "fast clear" CCS_D.
Fixes: 39f06e28485 ("iris: Implement pipe->texture_subdata directly")
Tested-by: Mark Janes <mark.a.janes at intel.com>
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6005>
---
src/gallium/drivers/iris/iris_resource.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index ffb0990bded..d37f7426583 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -2095,7 +2095,8 @@ iris_texture_subdata(struct pipe_context *ctx,
* stall-avoidance blits.
*/
if (surf->tiling == ISL_TILING_LINEAR ||
- res->aux.usage == ISL_AUX_USAGE_CCS_E ||
+ (isl_aux_usage_has_ccs(res->aux.usage) &&
+ res->aux.usage != ISL_AUX_USAGE_CCS_D) ||
resource_is_busy(ice, res)) {
return u_default_texture_subdata(ctx, resource, level, usage, box,
data, stride, layer_stride);
More information about the mesa-commit
mailing list