llvmpipe: don't store number of layers per level
authorRoland Scheidegger <sroland@vmware.com>
Fri, 1 Aug 2014 21:22:39 +0000 (23:22 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 1 Aug 2014 21:31:11 +0000 (23:31 +0200)
commit3b69347efc314c4c01e63781e4d7ffea68460442
treefca92de7cfa46e57484adac4dc217b4f69801492
parent7e7aebbbd0a811f4406fb41b13e6f7050d5a13f4
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 <jfonseca@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/llvmpipe/lp_texture.c
src/gallium/drivers/llvmpipe/lp_texture.h