[Mesa-dev] [PATCH 2/2] main/state: Flag new constants for compute shaders

Jordan Justen jordan.l.justen at intel.com
Tue Jun 16 16:52:19 PDT 2015


On 2015-06-16 14:51:38, Marek Olšák wrote:
> One question: Why?
> 
> I just removed the same code for GS:
> http://cgit.freedesktop.org/mesa/mesa/commit/?id=42a3c1ec8471fc76eb6d3d6f1bd1739e24a5f33a

Yeah. I think you are right. I'll drop this patch. Thanks!

-Jordan

> On Tue, Jun 16, 2015 at 11:21 PM, Jordan Justen
> <jordan.l.justen at intel.com> wrote:
> > Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> > ---
> >  src/mesa/main/state.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
> > index bede7fe..beb2721 100644
> > --- a/src/mesa/main/state.c
> > +++ b/src/mesa/main/state.c
> > @@ -278,6 +278,16 @@ update_program_constants(struct gl_context *ctx)
> >        }
> >     }
> >
> > +   if (ctx->ComputeProgram._Current) {
> > +      const struct gl_program_parameter_list *params =
> > +         ctx->ComputeProgram._Current->Base.Parameters;
> > +      /*FIXME: StateFlags is always 0 because we have unnamed constant
> > +       *       not state changes */
> > +      if (params /*&& params->StateFlags & ctx->NewState*/) {
> > +         new_state |= _NEW_PROGRAM_CONSTANTS;
> > +      }
> > +   }
> > +
> >     return new_state;
> >  }
> >
> > --
> > 2.1.4
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list