diff options
author | Jakob Bornecrantz <[email protected]> | 2008-06-09 16:17:35 +0200 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2008-06-09 16:33:28 +0200 |
commit | cfc23bc54c8cae2615d447bc199ff87ef7e9298e (patch) | |
tree | 9e6cc87c53c381543a0f4913e3cbdae98d623f38 /src | |
parent | 2e3e5184176debb66bdd7f5f606cf95b7fee91bb (diff) |
i915: Disable color buffer writes if no color buffer is attached
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/i915simple/i915_state_immediate.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/drivers/i915simple/i915_state_immediate.c b/src/gallium/drivers/i915simple/i915_state_immediate.c index 704ea4d838c..2501f2d7cb8 100644 --- a/src/gallium/drivers/i915simple/i915_state_immediate.c +++ b/src/gallium/drivers/i915simple/i915_state_immediate.c @@ -156,8 +156,12 @@ const struct i915_tracked_state i915_upload_S5 = { */ static void upload_S6( struct i915_context *i915 ) { - unsigned LIS6 = (S6_COLOR_WRITE_ENABLE | - (2 << S6_TRISTRIP_PV_SHIFT)); + unsigned LIS6 = (2 << S6_TRISTRIP_PV_SHIFT); + + /* I915_NEW_FRAMEBUFFER + */ + if (i915->framebuffer.cbufs[0]) + LIS6 |= S6_COLOR_WRITE_ENABLE; /* I915_NEW_BLEND */ @@ -174,7 +178,7 @@ static void upload_S6( struct i915_context *i915 ) } const struct i915_tracked_state i915_upload_S6 = { - I915_NEW_BLEND | I915_NEW_DEPTH_STENCIL, + I915_NEW_BLEND | I915_NEW_DEPTH_STENCIL | I915_NEW_FRAMEBUFFER, upload_S6 }; |