[Mesa-dev] [PATCH] st/mesa: fix transform feedback of unsubscripted gl_ClipDistance array

Bryan Cain bryancain3 at gmail.com
Mon Jun 18 09:31:44 PDT 2012


On Jun 17, 2012 6:55 PM, "Bryan Cain" <bryancain3 at gmail.com> wrote:
>
> On 6/16/2012 5:43 PM, Marcin Slusarz wrote:
>>
>> gl_ClipDistance needs special treatment in form of lowering pass
>> which transforms gl_ClipDistance representation from float[] to
>> vec4[]. There are 2 implementations - at glsl linker level (enabled
>> by LowerClipDistance option) and at glsl_to_tgsi level (enabled
>> unconditionally for gallium drivers). Second implementation is
>> incomplete - it does not take into account transform feedback (see
>> commit 642e5b413e0890b2070ba78fde42db381eaf02e5 "mesa: Fix transform
>> feedback of unsubscripted gl_ClipDistance array" for details).
>>
>> There are 2 possible fixes:
>> - adding transform feedback support into glsl_to_tgsi version
>> - ripping gl_ClipDistance support from glsl_to_tgsi and enabling
>>   gl_ClipDistance lowering on glsl linker side
>>
>> This patch implements 2nd option. All it does is:
>> - reverts most of the commit 59be691638200797583bce39a83f641d30d97492
>>   "st/mesa: add support for gl_ClipDistance"
>> - changes LowerClipDistance to true
>>
>> Fixes Piglit tests "EXT_transform_feedback/builtin-varyings
>> gl_ClipDistance[{2,3,4,5,6,7,8}]-no-subscript" on nv50.
>> ---
>
>
> 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.

Disregard this.  I finally realized what your patch is (and isn't) doing.

-Bryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120618/142ee3ce/attachment.html>


More information about the mesa-dev mailing list