Mesa (master): intel/isl: Limit CCS to one level and layer on gen7

Nanley Chery nchery at kemper.freedesktop.org
Mon Jun 26 18:22:50 UTC 2017


Module: Mesa
Branch: master
Commit: b9343301913f8d47d175b25d57ec2a0561f5eb6f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b9343301913f8d47d175b25d57ec2a0561f5eb6f

Author: Nanley Chery <nanley.g.chery at intel.com>
Date:   Mon Apr 24 10:20:27 2017 -0700

intel/isl: Limit CCS to one level and layer on gen7

v2 (Jason Ekstrand):
- Remove Vulkan-specific terminology from the commit title.
- Replace '== 7' with '<= 7' to hint that this is a new feature on BDW+.

Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com> (v1)
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 src/intel/isl/isl.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index 2449ffb29a..ba56d86c17 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -1736,14 +1736,19 @@ isl_surf_get_ccs_surf(const struct isl_device *dev,
       return false;
    }
 
+   /* Multi-LOD and multi-layer CCS isn't supported on gen7. */
+   const uint8_t levels = ISL_DEV_GEN(dev) <= 7 ? 1 : surf->levels;
+   const uint32_t array_len = ISL_DEV_GEN(dev) <= 7 ?
+                              1 : surf->logical_level0_px.array_len;
+
    return isl_surf_init(dev, ccs_surf,
                         .dim = surf->dim,
                         .format = ccs_format,
                         .width = surf->logical_level0_px.width,
                         .height = surf->logical_level0_px.height,
                         .depth = surf->logical_level0_px.depth,
-                        .levels = surf->levels,
-                        .array_len = surf->logical_level0_px.array_len,
+                        .levels = levels,
+                        .array_len = array_len,
                         .samples = 1,
                         .usage = ISL_SURF_USAGE_CCS_BIT,
                         .tiling_flags = ISL_TILING_CCS_BIT);




More information about the mesa-commit mailing list