From 6d1cdec3ba151168bfc3aef222fba6265dfb41fb Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Fri, 6 Apr 2012 15:41:55 +0200 Subject: nouveau: switch to libdrm_nouveau-2.0 --- src/gallium/drivers/nouveau/nouveau_statebuf.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/nouveau/nouveau_statebuf.h') diff --git a/src/gallium/drivers/nouveau/nouveau_statebuf.h b/src/gallium/drivers/nouveau/nouveau_statebuf.h index dcffdd91154..4f8bd7bdf16 100644 --- a/src/gallium/drivers/nouveau/nouveau_statebuf.h +++ b/src/gallium/drivers/nouveau/nouveau_statebuf.h @@ -20,8 +20,13 @@ struct nouveau_statebuf_builder #define sb_data(sb, v) *(sb).p++ = (v) #endif -#define sb_method(sb, v, n) sb_data(sb, RING_3D(v, n)); +static INLINE uint32_t sb_header(unsigned subc, unsigned mthd, unsigned size) +{ + return (size << 18) | (subc << 13) | mthd; +} + +#define sb_method(sb, v, n) sb_data(sb, sb_header(SUBC_3D(v), n)); #define sb_len(sb, var) ((sb).p - (var)) -#define sb_emit(chan, sb_buf, sb_len) do {WAIT_RING((chan), (sb_len)); OUT_RINGp((chan), (sb_buf), (sb_len)); } while(0) +#define sb_emit(push, sb_buf, sb_len) do {PUSH_SPACE((push), (sb_len)); PUSH_DATAp((push), (sb_buf), (sb_len)); } while(0) #endif -- cgit v1.2.3