[Mesa-dev] [PATCH 3/4] i965: Make names of DRI image extension functions more consistent
Ander Conselvan de Oliveira
conselvan2 at gmail.com
Tue Feb 18 08:41:52 PST 2014
From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
Prefix everything with intel_dri_image.
---
src/mesa/drivers/dri/i965/intel_screen.c | 116 ++++++++++++++++---------------
1 file changed, 59 insertions(+), 57 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 768338b..5ef654e 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -358,9 +358,9 @@ intel_setup_image_from_dimensions(__DRIimage *image)
}
static __DRIimage *
-intel_create_image_from_name(__DRIscreen *screen,
- int width, int height, int format,
- int name, int pitch, void *loaderPrivate)
+intel_dri_image_create_from_name(__DRIscreen *screen,
+ int width, int height, int format,
+ int name, int pitch, void *loaderPrivate)
{
struct intel_screen *intelScreen = screen->driverPrivate;
__DRIimage *image;
@@ -388,8 +388,9 @@ intel_create_image_from_name(__DRIscreen *screen,
}
static __DRIimage *
-intel_create_image_from_renderbuffer(__DRIcontext *context,
- int renderbuffer, void *loaderPrivate)
+intel_dri_image_create_from_renderbuffer(__DRIcontext *context,
+ int renderbuffer,
+ void *loaderPrivate)
{
__DRIimage *image;
struct brw_context *brw = context->driverPrivate;
@@ -422,11 +423,11 @@ intel_create_image_from_renderbuffer(__DRIcontext *context,
}
static __DRIimage *
-intel_create_image_from_texture(__DRIcontext *context, int target,
- unsigned texture, int zoffset,
- int level,
- unsigned *error,
- void *loaderPrivate)
+intel_dri_image_create_from_texture(__DRIcontext *context, int target,
+ unsigned texture, int zoffset,
+ int level,
+ unsigned *error,
+ void *loaderPrivate)
{
__DRIimage *image;
struct brw_context *brw = context->driverPrivate;
@@ -482,17 +483,17 @@ intel_create_image_from_texture(__DRIcontext *context, int target,
}
static void
-intel_destroy_image(__DRIimage *image)
+intel_dri_image_destroy(__DRIimage *image)
{
intel_region_release(&image->region);
free(image);
}
static __DRIimage *
-intel_create_image(__DRIscreen *screen,
- int width, int height, int format,
- unsigned int use,
- void *loaderPrivate)
+intel_dri_image_create(__DRIscreen *screen,
+ int width, int height, int format,
+ unsigned int use,
+ void *loaderPrivate)
{
__DRIimage *image;
struct intel_screen *intelScreen = screen->driverPrivate;
@@ -528,7 +529,7 @@ intel_create_image(__DRIscreen *screen,
}
static GLboolean
-intel_query_image(__DRIimage *image, int attrib, int *value)
+intel_dri_image_query(__DRIimage *image, int attrib, int *value)
{
switch (attrib) {
case __DRI_IMAGE_ATTRIB_STRIDE:
@@ -563,7 +564,7 @@ intel_query_image(__DRIimage *image, int attrib, int *value)
}
static __DRIimage *
-intel_dup_image(__DRIimage *orig_image, void *loaderPrivate)
+intel_dri_image_dup(__DRIimage *orig_image, void *loaderPrivate)
{
__DRIimage *image;
@@ -591,7 +592,7 @@ intel_dup_image(__DRIimage *orig_image, void *loaderPrivate)
}
static GLboolean
-intel_validate_usage(__DRIimage *image, unsigned int use)
+intel_dri_image_validate_usage(__DRIimage *image, unsigned int use)
{
if (use & __DRI_IMAGE_USE_CURSOR) {
if (image->region->width != 64 || image->region->height != 64)
@@ -602,11 +603,11 @@ intel_validate_usage(__DRIimage *image, unsigned int use)
}
static __DRIimage *
-intel_create_image_from_names(__DRIscreen *screen,
- int width, int height, int fourcc,
- int *names, int num_names,
- int *strides, int *offsets,
- void *loaderPrivate)
+intel_dri_image_create_from_names(__DRIscreen *screen,
+ int width, int height, int fourcc,
+ int *names, int num_names,
+ int *strides, int *offsets,
+ void *loaderPrivate)
{
struct intel_image_format *f = NULL;
__DRIimage *image;
@@ -619,10 +620,10 @@ intel_create_image_from_names(__DRIscreen *screen,
if (f == NULL)
return NULL;
- image = intel_create_image_from_name(screen, width, height,
- __DRI_IMAGE_FORMAT_NONE,
- names[0], strides[0],
- loaderPrivate);
+ image = intel_dri_image_create_from_name(screen, width, height,
+ __DRI_IMAGE_FORMAT_NONE,
+ names[0], strides[0],
+ loaderPrivate);
if (image == NULL)
return NULL;
@@ -638,10 +639,10 @@ intel_create_image_from_names(__DRIscreen *screen,
}
static __DRIimage *
-intel_create_image_from_fds(__DRIscreen *screen,
- int width, int height, int fourcc,
- int *fds, int num_fds, int *strides, int *offsets,
- void *loaderPrivate)
+intel_dri_image_create_from_fds(__DRIscreen *screen,
+ int width, int height, int fourcc,
+ int *fds, int num_fds, int *strides,
+ int *offsets, void *loaderPrivate)
{
struct intel_screen *intelScreen = screen->driverPrivate;
struct intel_image_format *f;
@@ -684,16 +685,16 @@ intel_create_image_from_fds(__DRIscreen *screen,
}
static __DRIimage *
-intel_create_image_from_dma_bufs(__DRIscreen *screen,
- int width, int height, int fourcc,
- int *fds, int num_fds,
- int *strides, int *offsets,
- enum __DRIYUVColorSpace yuv_color_space,
- enum __DRISampleRange sample_range,
- enum __DRIChromaSiting horizontal_siting,
- enum __DRIChromaSiting vertical_siting,
- unsigned *error,
- void *loaderPrivate)
+intel_dri_image_create_from_dma_bufs(__DRIscreen *screen,
+ int width, int height, int fourcc,
+ int *fds, int num_fds,
+ int *strides, int *offsets,
+ enum __DRIYUVColorSpace yuv_color_space,
+ enum __DRISampleRange sample_range,
+ enum __DRIChromaSiting horizontal_siting,
+ enum __DRIChromaSiting vertical_siting,
+ unsigned *error,
+ void *loaderPrivate)
{
__DRIimage *image;
struct intel_image_format *f = intel_image_format_lookup(fourcc);
@@ -704,9 +705,9 @@ intel_create_image_from_dma_bufs(__DRIscreen *screen,
return NULL;
}
- image = intel_create_image_from_fds(screen, width, height, fourcc, fds,
- num_fds, strides, offsets,
- loaderPrivate);
+ image = intel_dri_image_create_from_fds(screen, width, height, fourcc, fds,
+ num_fds, strides, offsets,
+ loaderPrivate);
/*
* Invalid parameters and any inconsistencies between are assumed to be
@@ -729,7 +730,8 @@ intel_create_image_from_dma_bufs(__DRIscreen *screen,
}
static __DRIimage *
-intel_from_planar(__DRIimage *parent, int plane, void *loaderPrivate)
+intel_dri_image_create_from_planar(__DRIimage *parent, int plane,
+ void *loaderPrivate)
{
int width, height, offset, stride, dri_format, index, cpp;
struct intel_image_format *f;
@@ -782,18 +784,18 @@ intel_from_planar(__DRIimage *parent, int plane, void *loaderPrivate)
static struct __DRIimageExtensionRec intelImageExtension = {
.base = { __DRI_IMAGE, 8 },
- .createImageFromName = intel_create_image_from_name,
- .createImageFromRenderbuffer = intel_create_image_from_renderbuffer,
- .destroyImage = intel_destroy_image,
- .createImage = intel_create_image,
- .queryImage = intel_query_image,
- .dupImage = intel_dup_image,
- .validateUsage = intel_validate_usage,
- .createImageFromNames = intel_create_image_from_names,
- .fromPlanar = intel_from_planar,
- .createImageFromTexture = intel_create_image_from_texture,
- .createImageFromFds = intel_create_image_from_fds,
- .createImageFromDmaBufs = intel_create_image_from_dma_bufs
+ .createImageFromName = intel_dri_image_create_from_name,
+ .createImageFromRenderbuffer = intel_dri_image_create_from_renderbuffer,
+ .destroyImage = intel_dri_image_destroy,
+ .createImage = intel_dri_image_create,
+ .queryImage = intel_dri_image_query,
+ .dupImage = intel_dri_image_dup,
+ .validateUsage = intel_dri_image_validate_usage,
+ .createImageFromNames = intel_dri_image_create_from_names,
+ .fromPlanar = intel_dri_image_create_from_planar,
+ .createImageFromTexture = intel_dri_image_create_from_texture,
+ .createImageFromFds = intel_dri_image_create_from_fds,
+ .createImageFromDmaBufs = intel_dri_image_create_from_dma_bufs
};
static int
--
1.8.3.2
More information about the mesa-dev
mailing list