isl: account for protection in base usage checks

Only Cc stable because it's needed for the next patches.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29982>
This commit is contained in:
Lionel Landwerlin
2024-07-01 17:57:00 +03:00
committed by Marge Bot
parent 1337e00a89
commit 4eab285d4a

View File

@@ -242,7 +242,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) {