[Mesa-dev] [PATCH 2/2] i965 Gen6: Implement gl_ClipVertex.

Paul Berry stereotype441 at gmail.com
Fri Sep 30 18:14:21 PDT 2011


On 30 September 2011 10:04, Eric Anholt <eric at anholt.net> wrote:

> On Fri, 30 Sep 2011 01:09:32 -0700, Paul Berry <stereotype441 at gmail.com>
> wrote:
> Non-text part: multipart/mixed
> Non-text part: multipart/alternative
> > On 29 September 2011 23:16, Kenneth Graunke <kenneth at whitecape.org>
> wrote:
> >
> > > On 09/27/2011 11:05 AM, Paul Berry wrote:
> > > So, we trade support for fixed function clipping for gl_ClipVertex
> > > clipping?  That seems really unfortunate.  I know we don't use the new
> > > VS backend for fixed function today, but we will.
> > >
> >
> > My intention was never to give up support for fixed function clipping.  I
> > just don't know how to tell, from within the vertex shader backend,
> whether
> > the shader we're compiling is an application-defined GLSL shader or
> Mesa's
> > built-in fixed function vertex shader.  Since at the moment we use the
> old
> > VS backend for fixed function, and the new VS backend for
> > application-defined GLSL shaders, I figured I could dodge the question
> for
> > now by putting the fixed-function logic in the old VS backend and the
> > non-fixed-function logic in the new VS backend.  Unfortunately your eyes
> > were too sharp for me to get away with that dodge :)
>
> ctx->Shader.CurrentVertexProgram is the vertex shader, if enabled.
>
> If not, ctx->VertexProgram._Enabled tells us if a vertex program is in
> use, and ctx->VertexProgram.Current is that program.
>
> Otherwise, you're in fixed function.
>
> ctx->VertexProgram._Current points at one of those three.
>

Ok, thanks.  I'll send out a v2 patch that is more future proof.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110930/bb45ddec/attachment.html>


More information about the mesa-dev mailing list