i830: Fix culling with user fbos on gen2
Flip the cull bits when rendering to a user fbo on gen2. This was already done on gen3 (since before git history starts) but was missing from the gen2 code. Fixes rendering of the driver+kart model in supertuxkart kart selection screen. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
committed by
Ian Romanick
parent
3e2c7ca773
commit
021f15816e
@@ -601,6 +601,8 @@ i830CullFaceFrontFace(struct gl_context * ctx, GLenum unused)
|
||||
else if (ctx->Polygon.CullFaceMode != GL_FRONT_AND_BACK) {
|
||||
mode = CULLMODE_CW;
|
||||
|
||||
if (ctx->DrawBuffer && _mesa_is_user_fbo(ctx->DrawBuffer))
|
||||
mode ^= (CULLMODE_CW ^ CULLMODE_CCW);
|
||||
if (ctx->Polygon.CullFaceMode == GL_FRONT)
|
||||
mode ^= (CULLMODE_CW ^ CULLMODE_CCW);
|
||||
if (ctx->Polygon.FrontFace != GL_CCW)
|
||||
|
||||
Reference in New Issue
Block a user