summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-07-05 22:20:28 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-07-05 22:22:41 +0100
commit3b5971bd2359383cb8326702d80e03bc15d34c69 (patch)
treeda9270e5d3824692b0d1bbffbc2af75028103ad6 /src
parent5fa3e73f2c03bcadb87c1760f76f853c22fdba18 (diff)
sna/gen2: Restore invariant ENABLES
One deletion too many, unnoticed until the next reboot. Besides the failure to disable logic op and enable colour buffer blending which causes a hang if you subsequently try to enable both, you also need to request texture caching... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/gen2_render.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c
index ccee6269..e6d6fe3f 100644
--- a/src/sna/gen2_render.c
+++ b/src/sna/gen2_render.c
@@ -510,6 +510,24 @@ static void gen2_emit_invariant(struct sna *sna)
ENABLE_SRC_BLND_FACTOR | SRC_BLND_FACT(BLENDFACTOR_ONE) |
ENABLE_DST_BLND_FACTOR | DST_BLND_FACT(BLENDFACTOR_ZERO));
+ OUT_BATCH(_3DSTATE_ENABLES_1_CMD |
+ DISABLE_LOGIC_OP |
+ DISABLE_STENCIL_TEST |
+ DISABLE_DEPTH_BIAS |
+ DISABLE_SPEC_ADD |
+ DISABLE_FOG |
+ DISABLE_ALPHA_TEST |
+ DISABLE_DEPTH_TEST |
+ ENABLE_COLOR_BLEND);
+
+ OUT_BATCH(_3DSTATE_ENABLES_2_CMD |
+ DISABLE_STENCIL_WRITE |
+ DISABLE_DITHER |
+ DISABLE_DEPTH_WRITE |
+ ENABLE_COLOR_MASK |
+ ENABLE_COLOR_WRITE |
+ ENABLE_TEX_CACHE);
+
sna->render_state.gen2.need_invariant = FALSE;
}