draw/llvm: skip clipping and viewport transform if there's no position output
authorRoland Scheidegger <sroland@vmware.com>
Fri, 1 Mar 2013 13:50:40 +0000 (14:50 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Sat, 2 Mar 2013 01:54:31 +0000 (02:54 +0100)
commitde0593e33346609d85b8ab9f9f40d0b91171c1dd
tree6e78fa50044fb3a2440d29b3bab0f484ecd5943b
parent2ef13e7c557eb5b5d017e25ff7c15b2912996c6f
draw/llvm: skip clipping and viewport transform if there's no position output

With glsl 1.40 writing position is not required (useful for transform
feedback, though in fact it's still possible to rasterize such geometry
even if the results aren't too well defined).
Prevents crashes in that case. Fixes piglit glsl-1.40-tf-no-position.
Not quite sure this is 100% correct as it also skips clipdistance
clipping which could still work (but not sure if the result would
really be needed?)

Reviewed-by: Jose Fonseca <jfonseca@vmware.com
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/draw/draw_llvm.c