diff options
author | Roland Scheidegger <[email protected]> | 2014-08-01 23:22:39 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2014-08-01 23:31:11 +0200 |
commit | 3b69347efc314c4c01e63781e4d7ffea68460442 (patch) | |
tree | fca92de7cfa46e57484adac4dc217b4f69801492 /src/gallium/drivers/llvmpipe/lp_texture.h | |
parent | 7e7aebbbd0a811f4406fb41b13e6f7050d5a13f4 (diff) |
llvmpipe: don't store number of layers per level
This could be recalculated, though it turns out the only use of it after
resource allocation is for calculating whole resource size (for scene size
accounting though that isn't quite ideal neither). Thus, instead just store
the whole resource size and drop it (saving a couple bytes of storage per
resource). It makes things simpler too. Note that for the accounting winsys
resources always come back with size 0 but this is unchanged (we don't actually
know the size in any case).
Also reformat llvmpipe_texture_layout (drop unneded indentation).
v2: adapt to previous changes.
Reviewed-by: Jose Fonseca <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_texture.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_texture.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.h b/src/gallium/drivers/llvmpipe/lp_texture.h index 34c3f604066..aa624b05ea4 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.h +++ b/src/gallium/drivers/llvmpipe/lp_texture.h @@ -64,10 +64,10 @@ struct llvmpipe_resource unsigned row_stride[LP_MAX_TEXTURE_LEVELS]; /** Image stride (for cube maps, array or 3D textures) in bytes */ unsigned img_stride[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 mip_offsets[LP_MAX_TEXTURE_LEVELS]; + /** allocated total size (for non-display target texture resources only) */ + unsigned total_alloc_size; /** * Display target, for textures with the PIPE_BIND_DISPLAY_TARGET |