[Mesa-dev] [PATCH 19/20] i915: Fix culling with user fbos on gen2
ville.syrjala at linux.intel.com
ville.syrjala at linux.intel.com
Mon Mar 23 05:47:35 PDT 2015
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
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 at linux.intel.com>
---
src/mesa/drivers/dri/i915/i830_state.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c
index 3e379f3..3e7021c 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)
--
2.0.5
More information about the mesa-dev
mailing list