[Mesa-dev] [PATCH 07/43] intel/isl: Add support for gen4 cube maps to get_image_offset_sa

Pohjolainen, Topi topi.pohjolainen at gmail.com
Wed May 17 18:06:14 UTC 2017


On Wed, May 17, 2017 at 02:40:55AM -0700, Kenneth Graunke wrote:
> On Tuesday, May 16, 2017 11:29:32 PM PDT Pohjolainen, Topi wrote:
> > On Tue, May 16, 2017 at 03:45:01PM -0700, Jason Ekstrand wrote:
> > > Gen4 cube maps are a 2-D surface with ISL_DIM_LAYOUT_GEN4_3D which is a
> > > bit weird but accurate none the less.
> > > ---
> > >  src/intel/isl/isl.c | 23 ++++++++++++++++++-----
> > >  1 file changed, 18 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
> > > index f70e188..c728a85 100644
> > > --- a/src/intel/isl/isl.c
> > > +++ b/src/intel/isl/isl.c
> > > @@ -1829,8 +1829,15 @@ get_image_offset_sa_gen4_3d(const struct isl_surf *surf,
> > >                              uint32_t *y_offset_sa)
> > >  {
> > >     assert(level < surf->levels);
> > > -   assert(logical_z_offset_px < isl_minify(surf->phys_level0_sa.depth, level));
> > > -   assert(surf->phys_level0_sa.array_len == 1);
> > > +   if (surf->dim == ISL_SURF_DIM_3D) {
> > > +      assert(surf->phys_level0_sa.array_len == 1);
> > > +      assert(logical_z_offset_px < isl_minify(surf->phys_level0_sa.depth, level));
> > > +   } else {
> > > +      assert(surf->dim == ISL_SURF_DIM_2D);
> > > +      assert(surf->usage & ISL_SURF_USAGE_CUBE_BIT);
> > > +      assert(surf->phys_level0_sa.array_len == 6);
> > 
> > Doesn't CUBE_MAP_ARRAY come here?
> 
> Nope - GL_ARB_texture_cube_map_array is Gen6+ only.  It'll never happen
> on Gen4-5.  Old hardware doesn't have cube array support.

Okay, I didn't even think there wasn't support on older hw.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>


More information about the mesa-dev mailing list