summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_texture.h
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2012-11-12 20:08:19 +0100
committerRoland Scheidegger <[email protected]>2012-11-12 21:02:59 +0100
commit8257bb963f0b21c0c35da479707b5cacbc1c2824 (patch)
tree4fc8a9c0c7fd8f0f6ba54509c010b25dae168520 /src/gallium/drivers/llvmpipe/lp_texture.h
parentdf3cecab7d04f73eb3b010a511a048c3b87694a5 (diff)
llvmpipe: always allocate whole miptrees not individual levels
This is preparation work for using mip level offsets + base_ptr for texture sampling instead of per-mip pointers. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_texture.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_texture.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.h b/src/gallium/drivers/llvmpipe/lp_texture.h
index b4a0dfd1c36..73eaddc27ed 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.h
+++ b/src/gallium/drivers/llvmpipe/lp_texture.h
@@ -94,6 +94,9 @@ struct llvmpipe_resource
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];
+ /** Offset to start of mipmap level, in bytes */
+ unsigned tiled_mip_offsets[LP_MAX_TEXTURE_LEVELS];
+ unsigned linear_mip_offsets[LP_MAX_TEXTURE_LEVELS];
/**
* Display target, for textures with the PIPE_BIND_DISPLAY_TARGET
@@ -104,8 +107,8 @@ struct llvmpipe_resource
/**
* Malloc'ed data for regular textures, or a mapping to dt above.
*/
- struct llvmpipe_texture_image tiled[LP_MAX_TEXTURE_LEVELS];
- struct llvmpipe_texture_image linear[LP_MAX_TEXTURE_LEVELS];
+ struct llvmpipe_texture_image tiled_img;
+ struct llvmpipe_texture_image linear_img;
/**
* Data for non-texture resources.