[Mesa-dev] [PATCH] mesa: Fix detection of whether an ARB_vp is enabled for two sided lighting.

Eric Anholt eric at anholt.net
Wed Oct 19 17:54:05 PDT 2011


On Wed, 19 Oct 2011 11:28:42 -0600, Brian Paul <brianp at vmware.com> wrote:
> On 10/19/2011 10:49 AM, Eric Anholt wrote:
> > When there is no ARB_vertex_program program enabled, the Current
> > pointer points at a default program, so we were always using
> > VERTEX_PROGRAM_TWO_SIDE, even for fixed function lighting.
> >
> > Fixes piglit two-sided-lighting*
> > ---
> >   src/mesa/main/state.c |    2 +-
> >   1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
> > index 98ca733..80fd03b 100644
> > --- a/src/mesa/main/state.c
> > +++ b/src/mesa/main/state.c
> > @@ -461,7 +461,7 @@ static void
> >   update_twoside(struct gl_context *ctx)
> >   {
> >      if (ctx->Shader.CurrentVertexProgram ||
> > -       ctx->VertexProgram.Current) {
> > +       ctx->VertexProgram._Enabled) {
> >         ctx->VertexProgram._TwoSideEnabled = ctx->VertexProgram.TwoSideEnabled;
> >      } else {
> >         ctx->VertexProgram._TwoSideEnabled = (ctx->Light.Enabled&&
> 
> Was this failing on i965 for you?  The two-sided tests pass for me on 
> my GM45 Express.
> 
> In any case,
> 
> Reviewed-by: Brian Paul <brianp at vmware.com>

They pass for you because I never fixed pre-gen6 to respect
VERTEX_PROGRAM_TWO_SIDE using this flag :)
-------------- 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/20111019/d473ef12/attachment.pgp>


More information about the mesa-dev mailing list