[Mesa-dev] [PATCH v4 10/34] i965/miptree: Add a helper for getting an isl_surf from a miptree

Chad Versace chad.versace at intel.com
Thu Jul 14 20:50:05 UTC 2016


On Thu 14 Jul 2016, Jason Ekstrand wrote:
> On Thu, Jul 14, 2016 at 11:42 AM, Chad Versace <chad.versace at intel.com>
> wrote:
> 
> > On Wed 13 Jul 2016, Jason Ekstrand wrote:
> > > Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> > > ---
> > >  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 175
> > +++++++++++++++++++++++++-
> > >  src/mesa/drivers/dri/i965/intel_mipmap_tree.h |   6 +
> > >  2 files changed, 179 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > > index b6265dc..8519f46 100644
> > > --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > > +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> > > @@ -26,8 +26,6 @@
> > >  #include <GL/gl.h>
> > >  #include <GL/internal/dri_interface.h>
> > >
> > > -#include "isl/isl.h"
> > > -
> > >  #include "intel_batchbuffer.h"
> > >  #include "intel_mipmap_tree.h"
> > >  #include "intel_resolve_map.h"
> > > @@ -2999,3 +2997,176 @@ intel_miptree_unmap(struct brw_context *brw,
> > >
> > >     intel_miptree_release_map(mt, level, slice);
> > >  }
> > > +
> > > +void
> > > +intel_miptree_get_isl_surf(struct brw_context *brw,
> > > +                           const struct intel_mipmap_tree *mt,
> > > +                           struct isl_surf *surf)
> > > +{
> >
> > This function doesn't handle intel_mipmap_tree::mcs_mt nor ::hiz_mt, and
> > that's ok. But you should document that.
> >
> 
> Read the next patch...
> 
> 
> > Also, it would be very good to assert here at the function top that mt
> > is not an auxiliary miptree, but don't see a way to easily do that. Do
> > you see a way?
> >
> 
> It's also used for the mcs/hiz mt because lots of stuff is shared.  Perhaps
> I should just pull the shared stuff into a helper?  I don't know.

No, I see now what I'm wrong. I read the next patch.


More information about the mesa-dev mailing list