diff options
author | Jason Ekstrand <[email protected]> | 2016-09-21 04:03:27 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-11-17 12:03:24 -0800 |
commit | 26c8bb7bc056ee2e5795fa34bcb2a666554b09dd (patch) | |
tree | f8a892ba4db45a35831fbb872d3a97012a9b4bfb /src | |
parent | 818c7bfb313014eb2c37bf40753524149ae1230d (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/isl/isl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c index 658650ba6f3..4d85c3b97fb 100644 --- a/src/intel/isl/isl.c +++ b/src/intel/isl/isl.c @@ -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. */ |