Add an assert

This commit is contained in:
Keith Whitwell 2006-02-24 10:10:50 +00:00
parent af853b0da7
commit b6759e2be7

View file

@ -104,7 +104,12 @@ intel_batchbuffer_require_space(struct intel_batchbuffer *batch,
/* Here are the crusty old macros, to be removed:
*/
#define BATCH_LOCALS
#define BEGIN_BATCH(n, flags) intel_batchbuffer_require_space(intel->batch, n*4, flags)
#define BEGIN_BATCH(n, flags) do { \
assert(!intel->prim.flush); \
intel_batchbuffer_require_space(intel->batch, n*4, flags); \
} while (0)
#define OUT_BATCH(d) intel_batchbuffer_emit_dword(intel->batch, d)
#define OUT_RELOC(buf,flags,delta) intel_batchbuffer_emit_reloc(intel->batch, buf, flags, delta)
#define ADVANCE_BATCH() do { } while(0)