diff options
author | Ville Syrjälä <[email protected]> | 2015-03-23 14:47:35 +0200 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2015-10-06 11:16:19 -0700 |
commit | 021f15816e74ec012b8cb904d9f0bc05ff5885b0 (patch) | |
tree | ddd35a6a55330d07272ee327d9864fdc0e7f5f20 /src/mesa | |
parent | 3e2c7ca7731362b9f8f872832aeed2f89e70e11c (diff) |
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ä <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i915/i830_state.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c index 906e942b020..7ce5ef7e41a 100644 --- a/src/mesa/drivers/dri/i915/i830_state.c +++ b/src/mesa/drivers/dri/i915/i830_state.c @@ -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) |