summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_texture.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-04-19 16:42:47 -0600
committerBrian Paul <[email protected]>2010-04-19 17:07:25 -0600
commit202ff7db490f4a1d041a88f11665fbd3ccea2201 (patch)
tree8da39cb98259a5f4c7da91ee534cca89b4b1d1a5 /src/gallium/drivers/llvmpipe/lp_texture.h
parentee7cf9d80ff962e714bc66487f621e03f21e1293 (diff)
llvmpipe: fix rendering to 3D textures
Treat cube faces and 3D texture slices in the same manner (they're layed out out continuously in memory). Additional clean-ups and improvements coming.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_texture.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_texture.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.h b/src/gallium/drivers/llvmpipe/lp_texture.h
index dd54e17dc46..57f3e0f72c8 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.h
+++ b/src/gallium/drivers/llvmpipe/lp_texture.h
@@ -94,6 +94,9 @@ struct llvmpipe_resource
/** Row stride in bytes */
unsigned stride[LP_MAX_TEXTURE_LEVELS];
unsigned tiles_per_row[LP_MAX_TEXTURE_LEVELS];
+ unsigned tiles_per_image[LP_MAX_TEXTURE_LEVELS];
+ /** Number of 3D slices or cube faces per level */
+ unsigned num_slices_faces[LP_MAX_TEXTURE_LEVELS];
/**
* Display target, for textures with the PIPE_BIND_DISPLAY_TARGET
@@ -112,8 +115,8 @@ struct llvmpipe_resource
*/
void *data;
- /** array [level][face or slice][tile] of layout values) */
- enum lp_texture_layout *layout[LP_MAX_TEXTURE_LEVELS][PIPE_TEX_FACE_MAX];
+ /** array [level][face or slice][tile_y][tile_x] of layout values) */
+ enum lp_texture_layout *layout[LP_MAX_TEXTURE_LEVELS];
boolean userBuffer; /** Is this a user-space buffer? */
unsigned timestamp;
@@ -195,6 +198,11 @@ llvmpipe_get_texture_image(struct llvmpipe_resource *resource,
enum lp_texture_usage usage,
enum lp_texture_layout layout);
+void *
+llvmpipe_get_texture_image_all(struct llvmpipe_resource *lpr,
+ unsigned level,
+ enum lp_texture_usage usage,
+ enum lp_texture_layout layout);
ubyte *
llvmpipe_get_texture_tile_linear(struct llvmpipe_resource *lpr,