Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / libs / mesa / src / gallium / drivers / nouveau / nouveau_statebuf.h
blobdcffdd911548e3a656a9cd5b4270aba3c4dec2b2
1 #ifndef __NOUVEAU_STATEBUF_H__
2 #define __NOUVEAU_STATEBUF_H__
4 /* state buffers: lightweight state objects interface */
5 /* relocations are not supported, but Gallium CSOs don't require them */
7 struct nouveau_statebuf_builder
9 uint32_t* p;
10 #ifdef DEBUG
11 uint32_t* pend;
12 #endif
15 #ifdef DEBUG
16 #define sb_init(var) {var, var + sizeof(var) / sizeof((var)[0])}
17 #define sb_data(sb, v) do {assert((sb).p != (sb).pend); *(sb).p++ = (v);} while(0)
18 #else
19 #define sb_init(var) {var}
20 #define sb_data(sb, v) *(sb).p++ = (v)
21 #endif
23 #define sb_method(sb, v, n) sb_data(sb, RING_3D(v, n));
25 #define sb_len(sb, var) ((sb).p - (var))
26 #define sb_emit(chan, sb_buf, sb_len) do {WAIT_RING((chan), (sb_len)); OUT_RINGp((chan), (sb_buf), (sb_len)); } while(0)
27 #endif