[Mesa-dev] [PATCH 5/5] mesa: Use functions to convert gl_shader_stage to PROGRAM enum or pipe target.
Paul Berry
stereotype441 at gmail.com
Thu Jan 9 09:28:48 PST 2014
On 8 January 2014 12:21, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 08/01/14 19:20, Paul Berry wrote:
> > diff --git a/src/mesa/program/program.h b/src/mesa/program/program.h
> > index 4015b4c..648233c 100644
> > --- a/src/mesa/program/program.h
> > +++ b/src/mesa/program/program.h
> > @@ -207,6 +207,24 @@ _mesa_program_enum_to_shader_stage(GLenum v)
> > }
> > }
> >
> > +
> > +static inline GLenum
> > +_mesa_shader_stage_to_program(gl_shader_stage stage)
> > +{
> > + switch (stage) {
> > + case MESA_SHADER_VERTEX:
> > + return GL_VERTEX_PROGRAM_ARB;
> > + case MESA_SHADER_FRAGMENT:
> > + return GL_FRAGMENT_PROGRAM_ARB;
> > + case MESA_SHADER_GEOMETRY:
> > + return GL_GEOMETRY_PROGRAM_NV;
> > + }
> > +
> > + ASSERT(0);
> Hi Paul
>
> Can you use a normal assert that prints a somewhat informative message -
> similar to what you did in shader_stage_to_ptarget()?
>
> Thanks
> Emil
>
Sure, no problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140109/47641107/attachment.html>
More information about the mesa-dev
mailing list