From 60e60bb3026a269fefe1cfd3312fdf3a7e4c595f Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Tue, 14 Jul 2009 08:00:49 +0200 Subject: radeon: Invert front face winding when rendering to FBO. Fixes fgl_glxgears and progs/demos/fbotexture after pressing 'c'. Tested with r300, radeon and r200 compile tested only. --- src/mesa/drivers/dri/r300/r300_state.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/drivers/dri/r300/r300_state.c') diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 4d504d14e3..12fbf281d9 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -434,6 +434,10 @@ static void r300UpdateCulling(GLcontext * ctx) break; } + /* Winding is inverted when rendering to FBO */ + if (ctx->DrawBuffer && ctx->DrawBuffer->Name) + val ^= R300_FRONT_FACE_CW; + R300_STATECHANGE(r300, cul); r300->hw.cul.cmd[R300_CUL_CULL] = val; } -- cgit v1.2.3