summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_cmdbuf.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-02-26 11:09:32 +1000
committerDave Airlie <airlied@redhat.com>2009-02-26 11:09:32 +1000
commit158ede35d50faae7cbc8aa2bb9288f93c9e60962 (patch)
tree1d3939af29dcfa3b34e63e8831b4849d164f0d1a /src/mesa/drivers/dri/r300/r300_cmdbuf.c
parent2c033f3893e808f109807f5e4744b61e79e78055 (diff)
r300: fixup texture state emission for kms path
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_cmdbuf.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index 3b12d36419..068a9f978b 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -168,10 +168,21 @@ static void emit_tex_offsets(GLcontext *ctx, struct radeon_state_atom * atom)
r300ContextPtr r300 = R300_CONTEXT(ctx);
BATCH_LOCALS(&r300->radeon);
int numtmus = packet0_count(r300, r300->hw.tex.offset.cmd);
+ int notexture = 0;
if (numtmus) {
int i;
+ for(i = 0; i < numtmus; ++i) {
+ radeonTexObj *t = r300->hw.textures[i];
+
+ if (!t)
+ notexture = 1;
+ }
+
+ if (r300->radeon.radeonScreen->kernel_mm && notexture) {
+ return;
+ }
BEGIN_BATCH_NO_AUTOSTATE(4 * numtmus);
for(i = 0; i < numtmus; ++i) {
radeonTexObj *t = r300->hw.textures[i];
@@ -188,6 +199,8 @@ static void emit_tex_offsets(GLcontext *ctx, struct radeon_state_atom * atom)
} else if (!r300->radeon.radeonScreen->kernel_mm) {
OUT_BATCH(t->override_offset);
}
+ else
+ OUT_BATCH(r300->radeon.radeonScreen->texOffset[0]);
}
}
END_BATCH();