mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 12:30:09 +01:00
intel/isl: Rework the asserts and fails in isl_surf_get_ccs
There are some invariants such as number of samples on which we should assert. However, most other things should silently return false since they're much easier for isl_surf_get_ccs to check than the caller. We also update the checking to be a bit more complete.
This commit is contained in:
parent
818c7bfb31
commit
26c8bb7bc0
1 changed files with 7 additions and 2 deletions
|
|
@ -1448,9 +1448,14 @@ isl_surf_get_ccs_surf(const struct isl_device *dev,
|
|||
assert(surf->samples == 1 && surf->msaa_layout == ISL_MSAA_LAYOUT_NONE);
|
||||
assert(ISL_DEV_GEN(dev) >= 7);
|
||||
|
||||
assert(ISL_DEV_GEN(dev) >= 8 || surf->dim == ISL_SURF_DIM_2D);
|
||||
if (surf->usage & ISL_SURF_USAGE_DISABLE_AUX_BIT)
|
||||
return false;
|
||||
|
||||
assert(surf->logical_level0_px.depth == 1);
|
||||
if (ISL_DEV_GEN(dev) <= 8 && surf->dim != ISL_SURF_DIM_2D)
|
||||
return false;
|
||||
|
||||
if (isl_format_is_compressed(surf->format))
|
||||
return false;
|
||||
|
||||
/* TODO: More conditions where it can fail. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue