aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2012-08-15 11:37:18 +0200
committerJakob Bornecrantz <[email protected]>2012-08-26 15:39:41 +0200
commit6bb71b8cbe6b17a5d59e369631502e642804406e (patch)
tree83f65ee781bb45342ce919916b340a7370a83bfa /src/mesa/drivers
parenta669a5055eadae85ffa000cea19a2241d0699348 (diff)
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 <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel/intel_regions.h1
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c28
2 files changed, 0 insertions, 29 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_regions.h b/src/mesa/drivers/dri/intel/intel_regions.h
index 782d6696dcf..4ff0efed72a 100644
--- a/src/mesa/drivers/dri/intel/intel_regions.h
+++ b/src/mesa/drivers/dri/intel/intel_regions.h
@@ -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;
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index f4c16022c38..103fcd257c1 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -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
};