[Mesa-dev] [PATCH] intel/isl: Add assertion for aux surface pitch
Anuj Phogat
anuj.phogat at gmail.com
Wed Feb 7 01:04:25 UTC 2018
On Tue, Feb 6, 2018 at 4:22 PM, Nanley Chery <nanleychery at gmail.com> wrote:
> On Mon, Feb 05, 2018 at 04:07:19PM -0800, Anuj Phogat wrote:
> > I don't have a test case hitting this assert. But, it's nice to have
> > an assert checking the limit.
> >
> > Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> > ---
> > src/intel/isl/isl_surface_state.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/src/intel/isl/isl_surface_state.c
> b/src/intel/isl/isl_surface_state.c
> > index bfb27fa4a4..afd4b80ddb 100644
> > --- a/src/intel/isl/isl_surface_state.c
> > +++ b/src/intel/isl/isl_surface_state.c
> > @@ -566,6 +566,8 @@ isl_genX(surf_fill_state_s)(const struct isl_device
> *dev, void *state,
> > s.AuxiliarySurfaceBaseAddress = info->aux_address;
> > s.AuxiliarySurfacePitch = pitch_in_tiles - 1;
> >
> > + assert(s.AuxiliarySurfacePitch <= 511);
> > +
>
> genxml already performs this assertion for us, see:
> __gen_uint(values->AuxiliarySurfacePitch, 3, 11)
>
right. I'll drop this patch.
>
>
> > #if GEN_GEN >= 8
> > assert(GEN_GEN >= 9 || info->aux_usage != ISL_AUX_USAGE_CCS_E);
> > /* Auxiliary surfaces in ISL have compressed formats but the
> hardware
> > --
> > 2.13.6
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180206/e55c8b5c/attachment.html>
More information about the mesa-dev
mailing list