From 8d4ee91743e4c9072dd3d76a3dfdc3249d8a7adb Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 1 Jul 2024 17:57:00 +0300 Subject: [PATCH] isl: account for protection in base usage checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only Cc stable because it's needed for the next patches. Signed-off-by: Lionel Landwerlin Cc: mesa-stable Reviewed-by: José Roberto de Souza Part-of: (cherry picked from commit 4eab285d4a89287224908e6b0d8b44e1b7b793f5) --- .pick_status.json | 2 +- src/intel/isl/isl_surface_state.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 664a9c853c4..076185313d1 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -824,7 +824,7 @@ "description": "isl: account for protection in base usage checks", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c index c2be341a595..d0b64b12fe3 100644 --- a/src/intel/isl/isl_surface_state.c +++ b/src/intel/isl/isl_surface_state.c @@ -239,7 +239,9 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state, /* They may only specify one of the above bits at a time */ assert(__builtin_popcount(_base_usage) == 1); /* The only other allowed bit is ISL_SURF_USAGE_CUBE_BIT */ - assert((info->view->usage & ~ISL_SURF_USAGE_CUBE_BIT) == _base_usage); + assert((info->view->usage & ~(ISL_SURF_USAGE_CUBE_BIT | + ISL_SURF_USAGE_PROTECTED_BIT)) == + _base_usage); #endif if (info->surf->dim == ISL_SURF_DIM_3D) {