diff options
Diffstat (limited to 'src/xvmc/intel_batchbuffer.h')
-rw-r--r-- | src/xvmc/intel_batchbuffer.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xvmc/intel_batchbuffer.h b/src/xvmc/intel_batchbuffer.h index d4d8037a..ea9058ce 100644 --- a/src/xvmc/intel_batchbuffer.h +++ b/src/xvmc/intel_batchbuffer.h @@ -10,6 +10,7 @@ extern int VERBOSE; #define BEGIN_BATCH(n) \ do { \ + assert(xvmc_driver->batch.space >= (n) *4); \ if (xvmc_driver->batch.space < (n)*4) \ intelFlushBatch(TRUE); \ batch_ptr = xvmc_driver->batch.ptr; \ @@ -21,6 +22,13 @@ extern int VERBOSE; batch_ptr += 4; \ } while (0) +#define OUT_RELOC(bo,read_domains,write_domains,delta) \ + do { \ + *(unsigned int *)batch_ptr = delta + bo->offset; \ + intel_batch_emit_reloc(bo, read_domains, write_domains, delta, batch_ptr); \ + batch_ptr += 4; \ + } while (0) + #define OUT_BATCH_SHORT(n) \ do { \ *(short *)batch_ptr = (n); \ @@ -44,4 +52,6 @@ extern void intelBatchbufferData(const void *, unsigned, unsigned); extern Bool intelInitBatchBuffer(void); extern void intelFiniBatchBuffer(void); extern void intelCmdIoctl(char *, unsigned); +extern void intel_batch_emit_reloc(dri_bo *bo, uint32_t read_domain, + uint32_t write_domain, uint32_t delta, unsigned char *); #endif /* _INTEL_BATCHBUFFER_H */ |