anv/sparse: assert a format can't be standard and non-standard

A format can't be standard and non-standard at the same time. If we
ever hit this assertion, it's because something behind the scenes has
evolved (such as the tiling formats) so something that was marked as
non-standard became standard. Add an assertion so we can quickly catch
these issues in the future and adjust the code.

I don't want to mix this assertion with the one in the line above
since that one is the most useful assertion we have in all the sparse
code, so it's good to know which one we're hitting.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27306>
This commit is contained in:
Paulo Zanoni
2024-04-23 16:09:17 -07:00
committed by Marge Bot
parent 4384c8782e
commit e3e5f8e6db
+1
View File
@@ -817,6 +817,7 @@ anv_sparse_calc_image_format_properties(struct anv_physical_device *pdevice,
* since non-opaque binds are not supported. Still, dEQP seems to care.
*/
assert(is_standard || is_known_nonstandard_format);
assert(!(is_standard && is_known_nonstandard_format));
}
uint32_t block_size = granularity.width * granularity.height *