[Mesa-dev] [PATCH 4/4] intel: Allocate s8_z24 non-texture renderbuffers when using separate stencil

Eric Anholt eric at anholt.net
Sun Jun 19 22:58:18 PDT 2011


On Sun, 19 Jun 2011 14:51:28 -0700, Chad Versace <chad at chad-versace.us> wrote:
> On Sun, 19 Jun 2011 10:15:49 -0700, Eric Anholt <eric at anholt.net> wrote:
> Non-text part: multipart/signed
> > On Fri, 17 Jun 2011 15:43:43 -0700, Chad Versace <chad at chad-versace.us> wrote:
> > > Now all infrastructure is in place to support s8_z24 non-texture
> > > renderbuffers for gen7.
> > > 
> > > Signed-off-by: Chad Versace <chad at chad-versace.us>
> > > ---
> > >  src/mesa/drivers/dri/intel/intel_fbo.c |   84 ++++++++++++++++++++++++++++++-
> > >  1 files changed, 81 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
> > > index 0d49a55..72dcf8f 100644
> > > --- a/src/mesa/drivers/dri/intel/intel_fbo.c
> > > +++ b/src/mesa/drivers/dri/intel/intel_fbo.c
> > > @@ -107,6 +107,12 @@ intel_get_pointer(struct gl_context * ctx, struct gl_renderbuffer *rb,
> > >  }
> > >  
> > >  
> > > +static struct gl_renderbuffer *
> > > +intel_create_renderbuffer_unwrapper(struct gl_context * ctx,
> > > +				    struct gl_renderbuffer *wrapper,
> > > +				    gl_format format);
> > > +
> > 
> > I'd probably call this intel_create_wrapped_renderbuffer now.
> 
> Oops... thanks for catching that. I forgot to rename this func.
> 
> > 
> > > @@ -196,6 +204,38 @@ intel_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer
> > >  				       width,
> > >  				       height / 2,
> > >  				       GL_TRUE);
> > > +   } else if (irb->Base.Format == MESA_FORMAT_S8_Z24
> > > +	      && intel->has_separate_stencil) {
> > 
> > itym must_use_separate_stencil?
> 
> I meant has_separate_stencil.
> 
> Gen5 and gen6 will *eventually* have:
>      .has_hiz = true
>      .has_separate_stencil = true
>      .must_use_separate_stencil = false
> 
> Gen7 *now* has:
>      .has_hiz = false
>      .has_separate_stencil = true
>      .must_use_separate_stencil = true

I got that part, I just didn't actually expect us to go separate stencil
when asked for S8Z24 unless the hardware has no other option.  I guess
it's down to whether the extra memory bw for separate stencil ends up
being more or less than that saved by hiz including the cost of resolves
-- my first guess would have been "no", but I don't actually have data.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110619/bc5402df/attachment.pgp>


More information about the mesa-dev mailing list