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:
@@ -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 *
|
||||
|
||||
Reference in New Issue
Block a user