On Tue, Jun 13, 2017 at 11:41 AM, Nanley Chery <nanleych...@gmail.com> wrote:
> Signed-off-by: Nanley Chery <nanley.g.ch...@intel.com> > --- > 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 860fc28b27..b593e153dc 100644 > --- a/src/intel/isl/isl.c > +++ b/src/intel/isl/isl.c > @@ -1714,14 +1714,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; > I think I have a mild preference to use "<= 7" here. That way, it's clear that layered CCS is a new feature on Broadwell and not that there's some gen7-specific thing. Yes, I know that gen6 and earlier don't have them so it doesn't matter. --Jason > + > 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); > -- > 2.13.1 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev