summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_ioctl.c
diff options
context:
space:
mode:
authorPauli Nieminen <suokkos@gmail.com>2009-08-22 02:43:41 +0300
committerPauli Nieminen <suokkos@gmail.com>2009-08-22 02:54:34 +0300
commit6c5c46f842c80d4397d7971bea1a439fcd5e57d1 (patch)
treeb25c2ca8e680c3d7d470291533fcb709f3dbca39 /src/mesa/drivers/dri/r300/r300_ioctl.c
parentc0f4063703265fc4009e6cadc2de79f553f99b1c (diff)
r300: Fix dri1 not to emit state that is not supported in old drm.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_ioctl.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_ioctl.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c
index bc33b607cf..3303078e39 100644
--- a/src/mesa/drivers/dri/r300/r300_ioctl.c
+++ b/src/mesa/drivers/dri/r300/r300_ioctl.c
@@ -507,7 +507,15 @@ static void r300EmitClearState(GLcontext * ctx)
R500_ALU_RGBA_A_SWIZ_0;
r500fp.cmd[7] = 0;
- emit_r500fp(ctx, &r500fp);
+ if (r300->radeon.radeonScreen->kernel_mm) {
+ emit_r500fp(ctx, &r500fp);
+ } else {
+ int dwords = r500fp.check(ctx,&r500fp);
+ BEGIN_BATCH_NO_AUTOSTATE(dwords);
+ OUT_BATCH_TABLE(r500fp.cmd, dwords);
+ END_BATCH();
+ }
+
}
BEGIN_BATCH(2);
@@ -593,14 +601,19 @@ static void r300EmitClearState(GLcontext * ctx)
PVS_SRC_REG_INPUT, NEGATE_NONE);
vpu.cmd[8] = 0x0;
- {
+ if (r300->radeon.radeonScreen->kernel_mm) {
int dwords = r300->hw.vap_flush.check(ctx,&r300->hw.vap_flush);
BEGIN_BATCH_NO_AUTOSTATE(dwords);
OUT_BATCH_TABLE(r300->hw.vap_flush.cmd, dwords);
END_BATCH();
+ emit_vpu(ctx, &vpu);
+ } else {
+ int dwords = vpu.check(ctx,&vpu);
+ BEGIN_BATCH_NO_AUTOSTATE(dwords);
+ OUT_BATCH_TABLE(vpu.cmd, dwords);
+ END_BATCH();
}
- emit_vpu(ctx, &vpu);
}
}