summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_context.c
diff options
context:
space:
mode:
authornobled <nobled@dreamwidth.org>2010-08-15 02:50:04 +0000
committerMarek Olšák <maraeo@gmail.com>2010-08-16 04:59:13 +0200
commitb0e1565b5f24c3f624745890170cce0700e620ff (patch)
treecf30a030f9684b7d054c160f45890d1e30c4a4e4 /src/gallium/drivers/r300/r300_context.c
parent27eb2e275544d78a229eaded9bafc0db60172675 (diff)
r300g: Fix macro
This fixes a potential bug if (has_hyperz) is false (it would still init the atom as if has_hyperz were true). Signed-off-by: Marek Olšák <maraeo@gmail.com>
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.c')
-rw-r--r--src/gallium/drivers/r300/r300_context.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index e8b6c4f7af..23b654e0c8 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -158,12 +158,14 @@ void r300_flush_cb(void *data)
}
#define R300_INIT_ATOM(atomname, atomsize) \
+ do { \
r300->atomname.name = #atomname; \
r300->atomname.state = NULL; \
r300->atomname.size = atomsize; \
r300->atomname.emit = r300_emit_##atomname; \
r300->atomname.dirty = FALSE; \
- insert_at_tail(&r300->atom_list, &r300->atomname);
+ insert_at_tail(&r300->atom_list, &r300->atomname); \
+ } while (0)
static void r300_setup_atoms(struct r300_context* r300)
{