mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
svga: fixed surface size to include array size
This patch fixes the total surface size in surface cache
to include array size as well.
Tested with MTT glretrace.
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit adead35320)
This commit is contained in:
parent
759d84177e
commit
729b999e35
1 changed files with 2 additions and 1 deletions
|
|
@ -48,6 +48,7 @@ surface_size(const struct svga_host_surface_cache_key *key)
|
|||
|
||||
assert(key->numMipLevels > 0);
|
||||
assert(key->numFaces > 0);
|
||||
assert(key->arraySize > 0);
|
||||
|
||||
if (key->format == SVGA3D_BUFFER) {
|
||||
/* Special case: we don't want to count vertex/index buffers
|
||||
|
|
@ -68,7 +69,7 @@ surface_size(const struct svga_host_surface_cache_key *key)
|
|||
total_size += img_size;
|
||||
}
|
||||
|
||||
total_size *= key->numFaces;
|
||||
total_size *= key->numFaces * key->arraySize;
|
||||
|
||||
return total_size;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue