mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
dri: Remove image write function
Since its not used by anything anymore and no release has gone out where it was being used. Tested-by: Scott Moreau <oreaus@gmail.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
This commit is contained in:
parent
a669a5055e
commit
6bb71b8cbe
4 changed files with 1 additions and 40 deletions
|
|
@ -935,8 +935,7 @@ struct __DRIdri2ExtensionRec {
|
|||
|
||||
#define __DRI_IMAGE_USE_SHARE 0x0001
|
||||
#define __DRI_IMAGE_USE_SCANOUT 0x0002
|
||||
#define __DRI_IMAGE_USE_CURSOR 0x0004
|
||||
#define __DRI_IMAGE_USE_WRITE 0x0008
|
||||
#define __DRI_IMAGE_USE_CURSOR 0x0004 /* Depricated */
|
||||
|
||||
/**
|
||||
* queryImage attributes
|
||||
|
|
@ -984,13 +983,6 @@ struct __DRIimageExtensionRec {
|
|||
*/
|
||||
GLboolean (*validateUsage)(__DRIimage *image, unsigned int use);
|
||||
|
||||
/**
|
||||
* Write data into image.
|
||||
*
|
||||
* \since 4
|
||||
*/
|
||||
int (*write)(__DRIimage *image, const void *buf, size_t count);
|
||||
|
||||
/**
|
||||
* Create an image out of a sub-region of a parent image. This
|
||||
* entry point lets us create individual __DRIimages for different
|
||||
|
|
|
|||
|
|
@ -515,8 +515,6 @@ gbm_dri_bo_create(struct gbm_device *gbm,
|
|||
dri_use |= __DRI_IMAGE_USE_SCANOUT;
|
||||
if (usage & GBM_BO_USE_CURSOR_64X64)
|
||||
dri_use |= __DRI_IMAGE_USE_CURSOR;
|
||||
if (usage & GBM_BO_USE_WRITE)
|
||||
dri_use |= __DRI_IMAGE_USE_WRITE;
|
||||
|
||||
/* Gallium drivers requires shared in order to get the handle/stride */
|
||||
dri_use |= __DRI_IMAGE_USE_SHARE;
|
||||
|
|
|
|||
|
|
@ -144,7 +144,6 @@ intel_region_get_aligned_offset(struct intel_region *region, uint32_t x,
|
|||
struct __DRIimageRec {
|
||||
struct intel_region *region;
|
||||
GLenum internal_format;
|
||||
uint32_t usage;
|
||||
uint32_t dri_format;
|
||||
GLuint format;
|
||||
uint32_t offset;
|
||||
|
|
|
|||
|
|
@ -339,13 +339,7 @@ intel_create_image(__DRIscreen *screen,
|
|||
tiling = I915_TILING_NONE;
|
||||
}
|
||||
|
||||
/* We only support write for cursor drm images */
|
||||
if ((use & __DRI_IMAGE_USE_WRITE) &&
|
||||
use != (__DRI_IMAGE_USE_WRITE | __DRI_IMAGE_USE_CURSOR))
|
||||
return NULL;
|
||||
|
||||
image = intel_allocate_image(format, loaderPrivate);
|
||||
image->usage = use;
|
||||
cpp = _mesa_get_format_bytes(image->format);
|
||||
image->region =
|
||||
intel_region_alloc(intelScreen, tiling, cpp, width, height, true);
|
||||
|
|
@ -399,7 +393,6 @@ intel_dup_image(__DRIimage *orig_image, void *loaderPrivate)
|
|||
}
|
||||
|
||||
image->internal_format = orig_image->internal_format;
|
||||
image->usage = orig_image->usage;
|
||||
image->dri_format = orig_image->dri_format;
|
||||
image->format = orig_image->format;
|
||||
image->offset = orig_image->offset;
|
||||
|
|
@ -416,29 +409,9 @@ intel_validate_usage(__DRIimage *image, unsigned int use)
|
|||
return GL_FALSE;
|
||||
}
|
||||
|
||||
/* We only support write for cursor drm images */
|
||||
if ((use & __DRI_IMAGE_USE_WRITE) &&
|
||||
use != (__DRI_IMAGE_USE_WRITE | __DRI_IMAGE_USE_CURSOR))
|
||||
return GL_FALSE;
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
intel_image_write(__DRIimage *image, const void *buf, size_t count)
|
||||
{
|
||||
if (image->region->map_refcount)
|
||||
return -1;
|
||||
if (!(image->usage & __DRI_IMAGE_USE_WRITE))
|
||||
return -1;
|
||||
|
||||
drm_intel_bo_map(image->region->bo, true);
|
||||
memcpy(image->region->bo->virtual, buf, count);
|
||||
drm_intel_bo_unmap(image->region->bo);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static __DRIimage *
|
||||
intel_create_sub_image(__DRIimage *parent,
|
||||
int width, int height, int dri_format,
|
||||
|
|
@ -490,7 +463,6 @@ static struct __DRIimageExtensionRec intelImageExtension = {
|
|||
intel_query_image,
|
||||
intel_dup_image,
|
||||
intel_validate_usage,
|
||||
intel_image_write,
|
||||
intel_create_sub_image
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue