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

Eric Anholt eric at anholt.net
Fri Sep 30 10:04:19 PDT 2011

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.
-------------- 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/20110930/f1f86bb7/attachment.pgp>

More information about the mesa-dev mailing list