diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile.sources | 2 | ||||
-rw-r--r-- | lib/media_fill.c | 9 | ||||
-rw-r--r-- | lib/media_fill.h | 50 |
3 files changed, 61 insertions, 0 deletions
diff --git a/lib/Makefile.sources b/lib/Makefile.sources index 699621b7..cad238ab 100644 --- a/lib/Makefile.sources +++ b/lib/Makefile.sources @@ -19,6 +19,8 @@ libintel_tools_la_SOURCES = \ intel_mmio.c \ intel_pci.c \ intel_reg.h \ + media_fill.c \ + media_fill.h \ rendercopy_i915.c \ rendercopy_i830.c \ gen6_render.h \ diff --git a/lib/media_fill.c b/lib/media_fill.c new file mode 100644 index 00000000..8ee5db6f --- /dev/null +++ b/lib/media_fill.c @@ -0,0 +1,9 @@ +#include "i830_reg.h" +#include "media_fill.h" + +media_fillfunc_t get_media_fillfunc(int devid) +{ + media_fillfunc_t fill = NULL; + + return fill; +} diff --git a/lib/media_fill.h b/lib/media_fill.h new file mode 100644 index 00000000..2e058cb2 --- /dev/null +++ b/lib/media_fill.h @@ -0,0 +1,50 @@ +#ifndef RENDE_MEDIA_FILL_H +#define RENDE_MEDIA_FILL_H + +#include <stdlib.h> +#include <sys/ioctl.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <fcntl.h> +#include <inttypes.h> +#include <errno.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <getopt.h> +#include "drm.h" +#include "i915_drm.h" +#include "drmtest.h" +#include "intel_bufmgr.h" +#include "intel_batchbuffer.h" +#include "intel_gpu_tools.h" + +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(uint8_t); +} + +static inline unsigned buf_height(struct scratch_buf *buf) +{ + return buf->size/buf->stride; +} + +typedef void (*media_fillfunc_t)(struct intel_batchbuffer *batch, + struct scratch_buf *dst, + unsigned x, unsigned y, + unsigned width, unsigned height, + uint8_t color); + +media_fillfunc_t get_media_fillfunc(int devid); + +#endif /* RENDE_MEDIA_FILL_H */ |