isl: fix layout for comparing surf and view properties

These asserts were checking isl_format_layout against itself, change
to compare surface format layout against view format layout.

Fixes: 628bfaf1c6 ("intel/isl: Add some sanity checks for compressed surfaces")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22790>
(cherry picked from commit c35d430460)
This commit is contained in:
Tapani Pälli 2023-05-04 13:39:41 +03:00 committed by Dylan Baker
parent 479a915d88
commit cdbd62c4a1
2 changed files with 11 additions and 4 deletions

View File

@ -5964,7 +5964,7 @@
"description": "isl: fix layout for comparing surf and view properties",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "628bfaf1c6f207ee01c59e236cef3fae942d6c55",
"notes": null

View File

@ -206,10 +206,17 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
ASSERTED const struct isl_format_layout *surf_fmtl =
isl_format_get_layout(info->surf->format);
ASSERTED const struct isl_format_layout *view_fmtl =
isl_format_get_layout(info->surf->format);
isl_format_get_layout(info->view->format);
assert(surf_fmtl->bpb == view_fmtl->bpb);
assert(surf_fmtl->bw == view_fmtl->bw);
assert(surf_fmtl->bh == view_fmtl->bh);
/* We could be attempting to upload blocks of compressed data via an
* uncompressed view, blocksize will not match there.
*/
if (isl_format_is_compressed(info->view->format)) {
assert(surf_fmtl->bw == view_fmtl->bw);
assert(surf_fmtl->bh == view_fmtl->bh);
}
}
s.SurfaceFormat = info->view->format;