[6/6] mesa: Set _NEW_VARYING_VP_INPUTS iff varying_vp_inputs are set.

Submitted by Mathias Fröhlich on May 12, 2019, 1:05 p.m.

Details

Message ID 42216c1c4390cd524c564ff4dbf025a71b46bf48.1557653318.git.Mathias.Froehlich@gmx.net
State New
Headers show
Series "Update mesa state handling past VAO changes." ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Mathias Fröhlich May 12, 2019, 1:05 p.m.
From: Mathias Fröhlich <mathias.froehlich@web.de>

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
---
 src/mesa/main/state.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

--
2.21.0

Patch hide | download patch | download mbox

diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 9d8964952cd..3e2eb28dcc5 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -430,15 +430,14 @@  set_varying_vp_inputs(struct gl_context *ctx, GLbitfield varying_inputs)
    if (VP_MODE_FF != ctx->VertexProgram._VPMode)
       return;

+   /* Only fixed-func generated programs ever uses varying_vp_inputs. */
+   if (!ctx->VertexProgram._MaintainTnlProgram &&
+       !ctx->FragmentProgram._MaintainTexEnvProgram)
+      return;
+
    if (ctx->varying_vp_inputs != varying_inputs) {
       ctx->varying_vp_inputs = varying_inputs;
-
-      /* Only fixed-func generated programs ever use varying_vp_inputs. */
-      if (ctx->VertexProgram._MaintainTnlProgram ||
-          ctx->FragmentProgram._MaintainTexEnvProgram) {
-         ctx->NewState |= _NEW_VARYING_VP_INPUTS;
-      }
-      /*printf("%s %x\n", __func__, varying_inputs);*/
+      ctx->NewState |= _NEW_VARYING_VP_INPUTS;
    }
 }


Comments


Hi Marek,

> Reviewed-by: Marek Olšák <marek.olsak@amd.com>

Thanks for the review!
Pushed!

best

Mathias


> 
> Marek
> 
> On Sun, May 12, 2019 at 9:05 AM <Mathias.Froehlich@gmx.net> wrote:
> 
> > From: Mathias Fröhlich <mathias.froehlich@web.de>
> >
> > Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
> > ---
> >  src/mesa/main/state.c | 13 ++++++-------
> >  1 file changed, 6 insertions(+), 7 deletions(-)
> >
> > diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
> > index 9d8964952cd..3e2eb28dcc5 100644
> > --- a/src/mesa/main/state.c
> > +++ b/src/mesa/main/state.c
> > @@ -430,15 +430,14 @@ set_varying_vp_inputs(struct gl_context *ctx,
> > GLbitfield varying_inputs)
> >     if (VP_MODE_FF != ctx->VertexProgram._VPMode)
> >        return;
> >
> > +   /* Only fixed-func generated programs ever uses varying_vp_inputs. */
> > +   if (!ctx->VertexProgram._MaintainTnlProgram &&
> > +       !ctx->FragmentProgram._MaintainTexEnvProgram)
> > +      return;
> > +
> >     if (ctx->varying_vp_inputs != varying_inputs) {
> >        ctx->varying_vp_inputs = varying_inputs;
> > -
> > -      /* Only fixed-func generated programs ever use varying_vp_inputs. */
> > -      if (ctx->VertexProgram._MaintainTnlProgram ||
> > -          ctx->FragmentProgram._MaintainTexEnvProgram) {
> > -         ctx->NewState |= _NEW_VARYING_VP_INPUTS;
> > -      }
> > -      /*printf("%s %x\n", __func__, varying_inputs);*/
> > +      ctx->NewState |= _NEW_VARYING_VP_INPUTS;
> >     }
> >  }
> >
> > --
> > 2.21.0
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>