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

Kenneth Graunke kenneth at whitecape.org
Wed May 17 09:40:55 UTC 2017


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170517/40a5b4d9/attachment.sig>


More information about the mesa-dev mailing list