[Mesa-dev] [PATCH 5/6] llvmpipe: get rid of llvmpipe_get_texture_image
sroland at vmware.com
sroland at vmware.com
Tue Jul 1 12:05:06 PDT 2014
From: Roland Scheidegger <sroland at vmware.com>
The only caller left used it only for non display target textures,
hence it was really the same as llvmpipe_get_texture_image_address - it
also had a usage flag but this was ignored anyway.
---
src/gallium/drivers/llvmpipe/lp_texture.c | 48 +------------------------------
src/gallium/drivers/llvmpipe/lp_texture.h | 5 ----
2 files changed, 1 insertion(+), 52 deletions(-)
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c
index f5383dc..3cb421c 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.c
+++ b/src/gallium/drivers/llvmpipe/lp_texture.c
@@ -372,7 +372,7 @@ llvmpipe_resource_map(struct pipe_resource *resource,
}
else if (llvmpipe_resource_is_texture(resource)) {
- map = llvmpipe_get_texture_image(lpr, layer, level, tex_usage);
+ map = llvmpipe_get_texture_image_address(lpr, layer, level);
return map;
}
else {
@@ -787,52 +787,6 @@ alloc_image_data(struct llvmpipe_resource *lpr)
}
-
-/**
- * Return pointer to texture image data
- * for a particular cube face or 3D texture slice.
- *
- * \param face_slice the cube face or 3D slice of interest
- * \param usage one of LP_TEX_USAGE_READ/WRITE_ALL/READ_WRITE
- */
-void *
-llvmpipe_get_texture_image(struct llvmpipe_resource *lpr,
- unsigned face_slice, unsigned level,
- enum lp_texture_usage usage)
-{
- void *target_data;
- unsigned target_offset;
- unsigned *target_off_ptr;
-
- assert(usage == LP_TEX_USAGE_READ ||
- usage == LP_TEX_USAGE_READ_WRITE ||
- usage == LP_TEX_USAGE_WRITE_ALL);
-
- if (lpr->dt) {
- assert(lpr->tex_data);
- }
-
- target_off_ptr = lpr->mip_offsets;
-
- if (!lpr->tex_data) {
- /* allocate memory for the target image now */
- alloc_image_data(lpr);
- }
-
- target_offset = target_off_ptr[level];
-
- if (face_slice > 0) {
- target_offset += face_slice * tex_image_face_size(lpr, level);
- }
-
- if (lpr->tex_data) {
- target_data = (uint8_t *) lpr->tex_data + target_offset;
- }
-
- return target_data;
-}
-
-
/**
* Get pointer to a linear image (not the tile!) at tile (x,y).
* \return pointer to start of image/face (not the tile)
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.h b/src/gallium/drivers/llvmpipe/lp_texture.h
index 5eb0f5a..b163226 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.h
+++ b/src/gallium/drivers/llvmpipe/lp_texture.h
@@ -217,11 +217,6 @@ ubyte *
llvmpipe_get_texture_image_address(struct llvmpipe_resource *lpr,
unsigned face_slice, unsigned level);
-void *
-llvmpipe_get_texture_image(struct llvmpipe_resource *resource,
- unsigned face_slice, unsigned level,
- enum lp_texture_usage usage);
-
ubyte *
llvmpipe_get_texture_tile_linear(struct llvmpipe_resource *lpr,
unsigned face_slice, unsigned level,
--
1.9.1
More information about the mesa-dev
mailing list