summaryrefslogtreecommitdiff
path: root/lib/intel_batchbuffer.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-22 19:27:04 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-22 19:39:46 +0100
commit0e22f14ed642af94db5f0dd7461920274be3361a (patch)
tree9330d305d9138437634c84721e30671aa4ecd9db /lib/intel_batchbuffer.h
parentbff22f7317a39605d53cf142e2c0f5c424d9c12c (diff)
tests|lib: remove assert.h includes
Only the igt core and non-test tools should have asserts to catch internal errors, tests and helper libraries should all user igt_asert instead. Fix things up where assert instead of igt_assert was used. One tiny step towards header sanity. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/intel_batchbuffer.h')
-rw-r--r--lib/intel_batchbuffer.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h
index b3e4b8ff..77640642 100644
--- a/lib/intel_batchbuffer.h
+++ b/lib/intel_batchbuffer.h
@@ -1,9 +1,9 @@
#ifndef INTEL_BATCHBUFFER_H
#define INTEL_BATCHBUFFER_H
-#include <assert.h>
#include <stdint.h>
#include "intel_bufmgr.h"
+#include "igt_core.h"
#define BATCH_SZ 4096
#define BATCH_RESERVED 16
@@ -58,7 +58,7 @@ intel_batchbuffer_space(struct intel_batchbuffer *batch)
static inline void
intel_batchbuffer_emit_dword(struct intel_batchbuffer *batch, uint32_t dword)
{
- assert(intel_batchbuffer_space(batch) >= 4);
+ igt_assert(intel_batchbuffer_space(batch) >= 4);
*(uint32_t *) (batch->ptr) = dword;
batch->ptr += 4;
}
@@ -67,7 +67,7 @@ static inline void
intel_batchbuffer_require_space(struct intel_batchbuffer *batch,
unsigned int sz)
{
- assert(sz < BATCH_SZ - BATCH_RESERVED);
+ igt_assert(sz < BATCH_SZ - BATCH_RESERVED);
if (intel_batchbuffer_space(batch) < sz)
intel_batchbuffer_flush(batch);
}
@@ -110,7 +110,7 @@ intel_batchbuffer_require_space(struct intel_batchbuffer *batch,
* scope.
*/
#define OUT_RELOC_FENCED(buf, read_domains, write_domain, delta) do { \
- assert((delta) >= 0); \
+ igt_assert((delta) >= 0); \
intel_batchbuffer_emit_reloc(batch, buf, delta, \
read_domains, write_domain, 1); \
} while (0)
@@ -128,7 +128,7 @@ intel_batchbuffer_require_space(struct intel_batchbuffer *batch,
* scope.
*/
#define OUT_RELOC(buf, read_domains, write_domain, delta) do { \
- assert((delta) >= 0); \
+ igt_assert((delta) >= 0); \
intel_batchbuffer_emit_reloc(batch, buf, delta, \
read_domains, write_domain, 0); \
} while (0)