diff options
author | Christoph Bumiller <[email protected]> | 2012-04-06 15:41:55 +0200 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2012-04-14 02:56:33 +1000 |
commit | 6d1cdec3ba151168bfc3aef222fba6265dfb41fb (patch) | |
tree | c8c013eaa14e1b7463b6b3f39221524d901370f6 /src/gallium/drivers/nouveau/nouveau_statebuf.h | |
parent | 3c7872f35f4ae439082d413ab31333cf99be7e91 (diff) |
nouveau: switch to libdrm_nouveau-2.0
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_statebuf.h')
-rw-r--r-- | src/gallium/drivers/nouveau/nouveau_statebuf.h | 9 |
1 files changed, 7 insertions, 2 deletions
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 |