[Mesa-dev] [PATCH] svga: include sample count in surface_size() computation
Charmaine Lee
charmainel at vmware.com
Wed Aug 30 17:35:26 UTC 2017
Reviewed-by: Charmaine Lee <charmainel at vmware.com>
________________________________________
From: Brian Paul <brianp at vmware.com>
Sent: Wednesday, August 30, 2017 10:16:05 AM
To: mesa-dev at lists.freedesktop.org
Cc: Charmaine Lee; Neha Bhende
Subject: [PATCH] svga: include sample count in surface_size() computation
Use MAX2() because sampleCount will be zero for non-MSAA surfaces.
No Piglit regressions.
---
src/gallium/drivers/svga/svga_screen_cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c
index 5cec435..686d94a 100644
--- a/src/gallium/drivers/svga/svga_screen_cache.c
+++ b/src/gallium/drivers/svga/svga_screen_cache.c
@@ -69,7 +69,7 @@ surface_size(const struct svga_host_surface_cache_key *key)
total_size += img_size;
}
- total_size *= key->numFaces * key->arraySize;
+ total_size *= key->numFaces * key->arraySize * MAX2(1, key->sampleCount);
return total_size;
}
--
1.9.1
More information about the mesa-dev
mailing list