summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r200/r200_state_init.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-09-01 16:04:39 +1000
committerDave Airlie <airlied@itt42.(none)>2009-09-01 16:06:02 +1000
commit7d361537661b93a501c9533271458a41b965ea79 (patch)
treecc5972589168c1c0d28f2f00c365551588c28a9c /src/mesa/drivers/dri/r200/r200_state_init.c
parenta2bd13fec9ac2bd77ee21cb85a636fde80ce0368 (diff)
downloadexternal_mesa3d-7d361537661b93a501c9533271458a41b965ea79.zip
external_mesa3d-7d361537661b93a501c9533271458a41b965ea79.tar.gz
external_mesa3d-7d361537661b93a501c9533271458a41b965ea79.tar.bz2
radeon: fix r100/r200 polygon stipple under kms
There really need to use state emits under kms, otherwise we end up with some dwords in the command buffer before we've ever emitted any useful state. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/mesa/drivers/dri/r200/r200_state_init.c')
-rw-r--r--src/mesa/drivers/dri/r200/r200_state_init.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_state_init.c b/src/mesa/drivers/dri/r200/r200_state_init.c
index 3e0ceba..7697306 100644
--- a/src/mesa/drivers/dri/r200/r200_state_init.c
+++ b/src/mesa/drivers/dri/r200/r200_state_init.c
@@ -885,6 +885,10 @@ void r200InitState( r200ContextPtr rmesa )
}
}
}
+ /* polygon stipple is done with irq for non-kms */
+ if (rmesa->radeon.radeonScreen->kernel_mm) {
+ ALLOC_STATE( stp, always, STP_STATE_SIZE, "STP/stp", 0 );
+ }
for (i = 0; i < 6; i++)
if (rmesa->radeon.radeonScreen->kernel_mm)
@@ -1117,6 +1121,11 @@ void r200InitState( r200ContextPtr rmesa )
rmesa->hw.sci.cmd[SCI_CMD_2] = CP_PACKET0(R200_RE_WIDTH_HEIGHT, 0);
if (rmesa->radeon.radeonScreen->kernel_mm) {
+
+ rmesa->hw.stp.cmd[STP_CMD_0] = CP_PACKET0(RADEON_RE_STIPPLE_ADDR, 0);
+ rmesa->hw.stp.cmd[STP_DATA_0] = 0;
+ rmesa->hw.stp.cmd[STP_CMD_1] = CP_PACKET0_ONE(RADEON_RE_STIPPLE_DATA, 31);
+
rmesa->hw.mtl[0].emit = mtl_emit;
rmesa->hw.mtl[1].emit = mtl_emit;