summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_cmdbuf.c
diff options
context:
space:
mode:
authorJerome Glisse <glisse@freedesktop.org>2008-11-16 17:58:43 +0100
committerJerome Glisse <glisse@freedesktop.org>2008-11-16 17:58:43 +0100
commitf1d98e51275eaa440e1c6b9c61e5e014faaad45a (patch)
tree5474fa3291f13f1aa6130a21e5e0c4e1a8de4956 /src/mesa/drivers/dri/r300/r300_cmdbuf.c
parent56c458e0f2027bc19b45ed3112e84b6ace67920f (diff)
radeon: fix pointer dangling
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_cmdbuf.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index b8740e298b..9d0ed698e1 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -83,6 +83,7 @@ int r300FlushCmdBufLocked(r300ContextPtr r300, const char *caller)
r300->cmdbuf.flushing = 1;
if (r300->cmdbuf.cs->cdw) {
ret = radeon_cs_emit(r300->cmdbuf.cs);
+ r300->hw.all_dirty = 1;
}
radeon_cs_erase(r300->cmdbuf.cs);
r300->cmdbuf.flushing = 0;
@@ -208,8 +209,7 @@ void r300EmitState(r300ContextPtr r300)
if (RADEON_DEBUG & (DEBUG_STATE | DEBUG_PRIMS))
fprintf(stderr, "%s\n", __FUNCTION__);
- if (r300->cmdbuf.cs->cdw && !r300->hw.is_dirty
- && !r300->hw.all_dirty)
+ if (r300->cmdbuf.cs->cdw && !r300->hw.is_dirty && !r300->hw.all_dirty)
return;
/* To avoid going across the entire set of states multiple times, just check
@@ -325,7 +325,7 @@ static void emit_cb_offset(r300ContextPtr r300, struct r300_state_atom * atom)
if (r300->radeon.radeonScreen->driScreen->dri2.enabled) {
rrb = fb->Attachment[BUFFER_BACK_LEFT].Renderbuffer;
}
- if (!rrb) {
+ if (!rrb || !rrb->bo) {
fprintf(stderr, "no rrb\n");
return;
}