diff options
author | Charmaine Lee <[email protected]> | 2017-06-06 11:52:50 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2017-06-30 08:24:27 -0600 |
commit | adead35320c0afe95f3f170a6047905179f8c6c3 (patch) | |
tree | f7bc80080d28c086bad5dcbdf3678e7590f2402a /src/gallium/drivers/svga | |
parent | 31fe1d10b291bcd1b9ee376d53db05028719831d (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r-- | src/gallium/drivers/svga/svga_screen_cache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c index 0816ff68c8a..5cec435830a 100644 --- a/src/gallium/drivers/svga/svga_screen_cache.c +++ b/src/gallium/drivers/svga/svga_screen_cache.c @@ -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; } |