svga: fix FBO / viewport bugs
authorBrian Paul <brianp@vmware.com>
Mon, 14 May 2012 22:33:58 +0000 (16:33 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 15 May 2012 20:56:54 +0000 (14:56 -0600)
commit1459c18f45f5bd2a2d99145247093f1b540478ad
treeacf960b4fa1cf25aa9526872c8727fc1fb83009a
parent4a8d47c264eb7e01ebfda2fbcbe0bf42f0882d38
svga: fix FBO / viewport bugs

When drawing to a FBO, the viewport wasn't always set correctly.  It
was fine in the usual case of the viewport dims matching the surface
dims but broken otherwise.  In particular, this was happening because
the viewport scale is negative for FBO rendering.

The piglit fbo-viewport test exercises this.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/drivers/svga/svga_state_framebuffer.c