[Mesa-dev] [PATCH] draw: fix clipvertex trouble if position comes from gs

Zack Rusin zackr at vmware.com
Wed Aug 6 07:33:47 PDT 2014


On Aug 5, 2014, at 9:40 PM, sroland at vmware.com wrote:
> From: Roland Scheidegger <sroland at vmware.com>
> 
> If the vertex shader has no position but the gs has, the clipvertex output
> was -1 (because it's the same as vs position in this case if there's no
> explicit clipvertex output). This caused crashes (or assertion failures) in
> clipping since in the end position (which came from gs) was different from
> cv (-1) and we then tried to use the bogus cv input.
> Rather than just test for -1 cv value in clipping, make it explicitly return
> the position output of the gs instead which seems cleaner (since we really
> don't want to use the clipvertex value from the vs (it could be a valid value
> in the (unsupported) case of vs writing clipvertex but still using a gs).
> This fixes piglit shader_runner clip-distance-out-values.shader_test.

Great. Well done! Both of those look good. 

Reviewed-by: Zack Rusin <zackr at vmware.com>



More information about the mesa-dev mailing list