Mesa (master): i965: Don' t clip everything if FRONT_AND_BACK culling while culling disabled.
Brian Paul
brianp at kemper.freedesktop.org
Tue Jul 28 14:58:51 UTC 2009
Module: Mesa
Branch: master
Commit: 1b445f96737cf5a1a28e81ff94a2e07b2cac3a96
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1b445f96737cf5a1a28e81ff94a2e07b2cac3a96
Author: Eric Anholt <eric at anholt.net>
Date: Mon Jul 20 17:58:12 2009 -0700
i965: Don't clip everything if FRONT_AND_BACK culling while culling disabled.
Fixes everything-black with meta_clear_tris on quake4-mpdemo and doom3-demo.
Bug #18844, 22077.
(cherry picked from commit 81d555068408d4343d7627c8bedda5675f09bd21)
---
src/mesa/drivers/dri/i965/brw_clip.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c
index 5cffceb..8fc9f89 100644
--- a/src/mesa/drivers/dri/i965/brw_clip.c
+++ b/src/mesa/drivers/dri/i965/brw_clip.c
@@ -152,7 +152,8 @@ static void upload_clip_prog(struct brw_context *brw)
/* _NEW_POLYGON */
if (key.primitive == GL_TRIANGLES) {
- if (ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK)
+ if (ctx->Polygon.CullFlag &&
+ ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK)
key.clip_mode = BRW_CLIPMODE_REJECT_ALL;
else {
GLuint fill_front = CLIP_CULL;
More information about the mesa-commit
mailing list