diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-03-22 15:31:15 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-03-22 15:31:15 +0100 |
commit | 7dc0001f3db58af82f7e34c83a9fdb5fe90baccd (patch) | |
tree | bbfc35f4c6ca4423f90752b3ee34755b57d1af47 /lib/intel_batchbuffer.h | |
parent | a8e8654f81380c19f7c90479f98b9d9314f638b3 (diff) |
lib: make rendercopy.h an internal header
And move the public interfaces into intel_batchbuffer.[hc].
A bit messy since we are fairly inconsistent with our header #include
handling.
Also exclude rendercopy.h from the documentation.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/intel_batchbuffer.h')
-rw-r--r-- | lib/intel_batchbuffer.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h index 10088c2e..5e02269c 100644 --- a/lib/intel_batchbuffer.h +++ b/lib/intel_batchbuffer.h @@ -2,6 +2,7 @@ #define INTEL_BATCHBUFFER_H #include <assert.h> +#include <stdint.h> #include "intel_bufmgr.h" #define BATCH_SZ 4096 @@ -195,4 +196,32 @@ void intel_copy_bo(struct intel_batchbuffer *batch, drm_intel_bo *dst_bo, drm_intel_bo *src_bo, long int size); +struct scratch_buf { + drm_intel_bo *bo; + uint32_t stride; + uint32_t tiling; + uint32_t *data; + uint32_t *cpu_mapping; + uint32_t size; + unsigned num_tiles; +}; + +static inline unsigned buf_width(struct scratch_buf *buf) +{ + return buf->stride/sizeof(uint32_t); +} + +static inline unsigned buf_height(struct scratch_buf *buf) +{ + return buf->size/buf->stride; +} + +typedef void (*render_copyfunc_t)(struct intel_batchbuffer *batch, + drm_intel_context *context, + struct scratch_buf *src, unsigned src_x, unsigned src_y, + unsigned width, unsigned height, + struct scratch_buf *dst, unsigned dst_x, unsigned dst_y); + +render_copyfunc_t get_render_copyfunc(int devid); + #endif |