[Mesa-dev] [PATCH v2 30/35] isl: Add asserts for gen8+ X/YOffset rules

Pohjolainen, Topi topi.pohjolainen at intel.com
Thu Jul 28 18:01:20 UTC 2016


On Thu, Jul 28, 2016 at 09:33:37AM -0700, Jason Ekstrand wrote:
>    On Jul 28, 2016 8:02 AM, "Pohjolainen, Topi"
>    <[1]topi.pohjolainen at intel.com> wrote:
>    >
>    > On Tue, Jul 26, 2016 at 03:02:21PM -0700, Jason Ekstrand wrote:
>    > > ---
>    > >  src/intel/isl/isl_surface_state.c | 10 ++++++++++
>    > >  1 file changed, 10 insertions(+)
>    > >
>    > > diff --git a/src/intel/isl/isl_surface_state.c
>    b/src/intel/isl/isl_surface_state.c
>    > > index 6febcbf..fb23414 100644
>    > > --- a/src/intel/isl/isl_surface_state.c
>    > > +++ b/src/intel/isl/isl_surface_state.c
>    > > @@ -414,6 +414,16 @@ isl_genX(surf_fill_state_s)(const struct
>    isl_device *dev, void *state,
>    > >        assert(info->surf->levels == 1);
>    > >        assert(info->surf->logical_level0_px.array_len == 1);
>    > >        assert(info->aux_usage == ISL_AUX_USAGE_NONE);
>    > > +
>    > > +      if (GEN_GEN >= 8) {
>    > > +         /* Broadwell added more rules. */
>    > > +         assert(info->surf->samples == 1);
>    > > +         if (isl_format_get_layout(info->view->format)->bpb == 8)
>    > > +            assert(info->x_offset_sa % 16 == 0);
>    >
>    > Should this go below and the one there up here?
> 
>    Feel free to double-check the PRM (I just did) but I believe this is
>    correct.

Okay, so the alignment ends up being 16 bytes in both cases.

> 
>    > > +         if (isl_format_get_layout(info->view->format)->bpb == 16)
>    > > +            assert(info->x_offset_sa % 8 == 0);
>    > > +      }
>    > > +
>    > >  #if GEN_GEN >= 7
>    > >        s.SurfaceArray = false;
>    > >  #endif
>    > > --
>    > > 2.5.0.400.gff86faf
>    > >
>    > > _______________________________________________
>    > > mesa-dev mailing list
>    > > [2]mesa-dev at lists.freedesktop.org
>    > > [3]https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 
> References
> 
>    1. mailto:topi.pohjolainen at intel.com
>    2. mailto:mesa-dev at lists.freedesktop.org
>    3. https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list