summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2017-08-21 13:08:41 -0600
committerBrian Paul <[email protected]>2017-08-30 13:59:14 -0600
commit5610911fed0f03962807ff9eb79d99eb005a5d71 (patch)
treecf064f8beb49eec5a588861091d84e827f5f6a77 /src
parent350ead0f26fa300fcf67a0119840c6873846665e (diff)
svga: include sample count in surface_size() computation
Use MAX2() because sampleCount will be zero for non-MSAA surfaces. No Piglit regressions. Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/svga/svga_screen_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c
index 5cec435830a..686d94aa50d 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;
}