On 30 September 2011 10:04, Eric Anholt <span dir="ltr"><<a href="mailto:eric@anholt.net">eric@anholt.net</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Fri, 30 Sep 2011 01:09:32 -0700, Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>> wrote:<br>
Non-text part: multipart/mixed<br>
Non-text part: multipart/alternative<br>
<div class="im">> On 29 September 2011 23:16, Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>> wrote:<br>
><br>
> > On 09/27/2011 11:05 AM, Paul Berry wrote:<br>
</div><div class="im">> > So, we trade support for fixed function clipping for gl_ClipVertex<br>
> > clipping? That seems really unfortunate. I know we don't use the new<br>
> > VS backend for fixed function today, but we will.<br>
> ><br>
><br>
> My intention was never to give up support for fixed function clipping. I<br>
> just don't know how to tell, from within the vertex shader backend, whether<br>
> the shader we're compiling is an application-defined GLSL shader or Mesa's<br>
> built-in fixed function vertex shader. Since at the moment we use the old<br>
> VS backend for fixed function, and the new VS backend for<br>
> application-defined GLSL shaders, I figured I could dodge the question for<br>
> now by putting the fixed-function logic in the old VS backend and the<br>
> non-fixed-function logic in the new VS backend. Unfortunately your eyes<br>
> were too sharp for me to get away with that dodge :)<br>
<br>
</div>ctx->Shader.CurrentVertexProgram is the vertex shader, if enabled.<br>
<br>
If not, ctx->VertexProgram._Enabled tells us if a vertex program is in<br>
use, and ctx->VertexProgram.Current is that program.<br>
<br>
Otherwise, you're in fixed function.<br>
<br>
ctx->VertexProgram._Current points at one of those three.<br>
</blockquote></div><br>Ok, thanks. I'll send out a v2 patch that is more future proof.<br>