From 33c3034765cfe4e919c8f37f09b51e9fea55aa33 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Fri, 29 Apr 2022 02:37:25 -0700 Subject: [PATCH] iris: Fix assertion meant to only target the clear-color stride Fixes: 2bc8c61fd00 ("iris: Return a 64B stride for clear color plane") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6398 Signed-off-by: Jordan Justen Reviewed-by: Nanley Chery Part-of: (cherry picked from commit 33456ae5a48c809cee251ca6d70f2b7f5941bc87) --- .pick_status.json | 2 +- src/gallium/drivers/iris/iris_resource.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 216a2e9597f..29647acf785 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1012,7 +1012,7 @@ "description": "iris: Fix assertion meant to only target the clear-color stride", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "2bc8c61fd00b2877319f54afeaba3d606fd8532c" }, diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 4742a996a2c..c23728577ad 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -1692,7 +1692,7 @@ iris_resource_get_param(struct pipe_screen *pscreen, * the plane's pitch should be ignored, some kernels have been found to * require 64-byte alignment. */ - assert(*value != 0 && *value % 64 == 0); + assert(*value != 0 && (!wants_cc || *value % 64 == 0)); return true; case PIPE_RESOURCE_PARAM_OFFSET: