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