diff options
author | Nanley Chery <nanley.g.chery@intel.com> | 2021-12-27 10:15:19 -0500 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2022-02-24 14:56:50 -0800 |
commit | a32927b18747c992c5576281d03db9168e813e71 (patch) | |
tree | 571d7f89b3d7029ad8c5ca3e2e7a822ebd197da8 | |
parent | 17580829123b09881bc5b56239d3099d01754f2d (diff) |
iris: Don't fast clear with the view format
Fast clear with the resource format instead. This is safe to do because
can_fast_clear_color ensures that the clear color generates the same
pixel with either the view format or the resource format.
On SKL, this prevents us from using an invalid surface state. This platform
doesn't support CCS_E with sRGB formats, but prior to this patch we allowed
fast-clearing with this combination. Piglit's fcc-write-after-clear test
can trigger this.
Fixes: 230952c2101 ("iris: Don't support sRGB + Y_TILED_CCS on gen9")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14806>
(cherry picked from commit 6778b3a379d010d9b4d82e7324bff19d73cd3d1a)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_clear.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json index 6f81089c774..f8587e0af2c 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -346,7 +346,7 @@ "description": "iris: Don't fast clear with the view format", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "230952c21017b184a9bfbfaa2c56489d55b71d30" }, diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c index 71385bce447..e599e0dc54b 100644 --- a/src/gallium/drivers/iris/iris_clear.c +++ b/src/gallium/drivers/iris/iris_clear.c @@ -280,7 +280,8 @@ fast_clear_color(struct iris_context *ice, iris_blorp_surf_for_resource(&batch->screen->isl_dev, &surf, p_res, res->aux.usage, level, true); - blorp_fast_clear(&blorp_batch, &surf, format, ISL_SWIZZLE_IDENTITY, + blorp_fast_clear(&blorp_batch, &surf, res->surf.format, + ISL_SWIZZLE_IDENTITY, level, box->z, box->depth, box->x, box->y, box->x + box->width, box->y + box->height); |