<p><br>
On Jun 17, 2012 6:55 PM, "Bryan Cain" <<a href="mailto:bryancain3@gmail.com">bryancain3@gmail.com</a>> wrote:<br>
><br>
> On 6/16/2012 5:43 PM, Marcin Slusarz wrote:<br>
>><br>
>> gl_ClipDistance needs special treatment in form of lowering pass<br>
>> which transforms gl_ClipDistance representation from float[] to<br>
>> vec4[]. There are 2 implementations - at glsl linker level (enabled<br>
>> by LowerClipDistance option) and at glsl_to_tgsi level (enabled<br>
>> unconditionally for gallium drivers). Second implementation is<br>
>> incomplete - it does not take into account transform feedback (see<br>
>> commit 642e5b413e0890b2070ba78fde42db381eaf02e5 "mesa: Fix transform<br>
>> feedback of unsubscripted gl_ClipDistance array" for details).<br>
>><br>
>> There are 2 possible fixes:<br>
>> - adding transform feedback support into glsl_to_tgsi version<br>
>> - ripping gl_ClipDistance support from glsl_to_tgsi and enabling<br>
>>   gl_ClipDistance lowering on glsl linker side<br>
>><br>
>> This patch implements 2nd option. All it does is:<br>
>> - reverts most of the commit 59be691638200797583bce39a83f641d30d97492<br>
>>   "st/mesa: add support for gl_ClipDistance"<br>
>> - changes LowerClipDistance to true<br>
>><br>
>> Fixes Piglit tests "EXT_transform_feedback/builtin-varyings<br>
>> gl_ClipDistance[{2,3,4,5,6,7,8}]-no-subscript" on nv50.<br>
>> ---<br>
><br>
><br>
> I can't say I know much about how transform feedback works, but is there a reason that the first fix would be difficult?  It seems like a waste to not take advantage of hardware support for clip distances because the current implementation isn't complete.</p>

<p>Disregard this.  I finally realized what your patch is (and isn't) doing.</p>
<p>-Bryan<br>
</p>