Re: [Mesa-dev] [PATCH 2/2] radeonsi: use guard band clipping

2016-04-06 Thread Marek Olšák
There is one small issue with this. It uses viewport extents clamped to [0, 16384], but it should use unclamped signed coordinates of the viewport. The hw clipper doesn't do any clamping, so it's easy to generate window coordinates outside of [-32768, 32768] if the viewport covers [-32768, 1] in

[Mesa-dev] [PATCH 2/2] radeonsi: use guard band clipping

2016-04-06 Thread Grigori Goronzy
With the previous changes to handling of viewport clipping, it is almost trivial to add proper support for guard band clipping. Select a suitable integer clipping value to keep inside the rasterizer's guard band range of [-32768, 32767] and program the hardware to use guard band clipping. Guard