On Sun, Apr 05, 2015 at 08:06:50PM +0300, Pohjolainen, Topi wrote:
> On Sun, Apr 05, 2015 at 08:46:16AM -0400, Ilia Mirkin wrote:
> > While this change is correct, the Intel guys will yell at you, because
> > they're somehow misusing this in meta for Broadwell, s.t. this will
> > cause crashes when blitting stencil. IMHO that's a problem that should
> > be fixed in their driver and this can go on, but... it's also not my
> > driver that's crashing -- they might feel differently :)
> 
> As far as I can tell we only do:
> 
>    _mesa_TexParameteri(target, GL_DEPTH_STENCIL_TEXTURE_MODE,
>                        GL_STENCIL_INDEX);
> 
> which suppose to be the right thing to do - we select the stencil to be
> sampled instead of depth. And this won't hit the path below. I made the
> change locally and I'm now running piglit on broadwell.
> 
> I noticed that _mesa_base_tex_format() is in turn used in
> 
> src/mesa/drivers/common/meta_blit.c
> 
> but we shouldn't go there with intel driver ever. On hardware older than
> broadwell we don't use meta and the one used on broadwell and newer
> is found in:
> 
> src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c
> 
> But lets see what piglit says.

Right you are. This is more subtle, we will hit it when we actually create
a temporary texture out of the given read renderbuffer. It seems that this
was hit first time when formats where adjusted and then Jason added the
conditional using ARB_stencil_texturing (which is not right either).

Really sorry that this is hindering your work now. I'll try to take a look
at this tomorrow.

> 
> > 
> > Reviewed-by: Ilia Mirkin <imir...@alum.mit.edu>
> > 
> > On Sun, Apr 5, 2015 at 2:48 AM, Dave Airlie <airl...@gmail.com> wrote:
> > > This was using the wrong extension, ARB_stencil_texturing
> > > doesn't mention any changes in this area.
> > >
> > > Signed-off-by: Dave Airlie <airl...@redhat.com>
> > > ---
> > >  src/mesa/main/teximage.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> > > index 8d9d7cf..36e0b56 100644
> > > --- a/src/mesa/main/teximage.c
> > > +++ b/src/mesa/main/teximage.c
> > > @@ -222,7 +222,7 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint 
> > > internalFormat )
> > >        }
> > >     }
> > >
> > > -   if (ctx->Extensions.ARB_stencil_texturing) {
> > > +   if (ctx->Extensions.ARB_texture_stencil8) {
> > >        switch (internalFormat) {
> > >        case GL_STENCIL_INDEX:
> > >        case GL_STENCIL_INDEX1:
> > > --
> > > 1.9.3
> > >
> > > _______________________________________________
> > > mesa-dev mailing list
> > > mesa-dev@lists.freedesktop.org
> > > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to