Mesa (master): radv: reduce the number of small surfaces that need CMASK or DCC

Samuel Pitoiset hakzsam at kemper.freedesktop.org
Fri Dec 22 09:40:20 UTC 2017


Module: Mesa
Branch: master
Commit: 79c495aa377c486b220da538558177208999283d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=79c495aa377c486b220da538558177208999283d

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Thu Dec 21 17:45:23 2017 +0100

radv: reduce the number of small surfaces that need CMASK or DCC

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

---

 src/amd/vulkan/radv_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index efd17e4889..15410f140e 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -813,7 +813,7 @@ static inline bool
 radv_image_can_enable_dcc_or_cmask(struct radv_image *image)
 {
 	if (image->info.samples <= 1 &&
-	    image->info.width <= 512 && image->info.height <= 512) {
+	    image->info.width * image->info.height <= 512 * 512) {
 		/* Do not enable CMASK or DCC for small surfaces where the cost
 		 * of the eliminate pass can be higher than the benefit of fast
 		 * clear. RadeonSI does this, but the image threshold is




More information about the mesa-commit mailing list