Re: [Mesa-dev] [PATCH] draw: handle nan clipdistance

2013-08-15 Thread Roland Scheidegger
Am 15.08.2013 20:27, schrieb Zack Rusin: >> I realize this function isn't used but it looks unnecessarily >> complicated - two constants one AND plus one comparison when you >> could simply do a single comparison (compare x with x with >> unordered not equal). This is actually doubly bad with AVX

Re: [Mesa-dev] [PATCH] draw: handle nan clipdistance

2013-08-15 Thread Zack Rusin
> I realize this function isn't used but it looks unnecessarily > complicated - two constants one AND plus one comparison when you could > simply do a single comparison (compare x with x with unordered not > equal). This is actually doubly bad with AVX because the int comparison > is going to use 4

Re: [Mesa-dev] [PATCH] draw: handle nan clipdistance

2013-08-15 Thread Roland Scheidegger
Am 15.08.2013 19:12, schrieb Zack Rusin: > If clipdistance for one of the vertices is nan (or inf) then the > entire primitive should be discarded. > > Signed-off-by: Zack Rusin > --- > src/gallium/auxiliary/draw/draw_cliptest_tmp.h |2 +- > src/gallium/auxiliary/draw/draw_llvm.c |

[Mesa-dev] [PATCH] draw: handle nan clipdistance

2013-08-15 Thread Zack Rusin
If clipdistance for one of the vertices is nan (or inf) then the entire primitive should be discarded. Signed-off-by: Zack Rusin --- src/gallium/auxiliary/draw/draw_cliptest_tmp.h |2 +- src/gallium/auxiliary/draw/draw_llvm.c |3 ++ src/gallium/auxiliary/draw/draw_pipe_clip.c