i965: fix polygon face orientation when rendering to FBO
authorRobert Ellison <papillo@vmware.com>
Wed, 11 Mar 2009 22:27:38 +0000 (16:27 -0600)
committerRobert Ellison <papillo@vmware.com>
Thu, 12 Mar 2009 03:19:45 +0000 (21:19 -0600)
commit6dceeb2eb804d708639d68a13a924d65f366458a
tree25baf111f173ea5288c3b092f204e8f4d6750b9b
parent548be3846db59ad43934a159c051b359db6e56db
i965: fix polygon face orientation when rendering to FBO

In the i965, the FBO coordinate system is inverted from the standard
OpenGL/Mesa coordinate system; that means that the viewport and the
polygon face orientation have to be inverted if rendering to a FBO.

The viewport was already being handled correctly; but polygon face
was not.  This caused a conform failure when rendering to texture with
two-sided lighting enabled.

This fixes the problem in the i965 driver, and adds to the comment about
the gl_framebuffer "Name" field so that this isn't a surprise to other
driver writers.
src/mesa/drivers/dri/i965/brw_sf.c
src/mesa/main/mtypes.h