[Mesa-dev] [PATCH 07/16] ac/surface/gfx9: fix a typo in CMASK RB/pipe alignment

Marek Olšák maraeo at gmail.com
Wed May 2 04:00:31 UTC 2018


From: Marek Olšák <marek.olsak at amd.com>

No change in behavior because it's always aligned.
---
 src/amd/common/ac_surface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c
index f14fa1c8b5e..b2af1f70b69 100644
--- a/src/amd/common/ac_surface.c
+++ b/src/amd/common/ac_surface.c
@@ -1147,21 +1147,21 @@ static int gfx9_compute_miptree(ADDR_HANDLE addrlib,
 		}
 
 		/* CMASK */
 		if (in->swizzleMode != ADDR_SW_LINEAR) {
 			ADDR2_COMPUTE_CMASK_INFO_INPUT cin = {0};
 			ADDR2_COMPUTE_CMASK_INFO_OUTPUT cout = {0};
 
 			cin.size = sizeof(ADDR2_COMPUTE_CMASK_INFO_INPUT);
 			cout.size = sizeof(ADDR2_COMPUTE_CMASK_INFO_OUTPUT);
 
-			if (in->numSamples) {
+			if (in->numSamples > 1) {
 				/* FMASK is always aligned. */
 				cin.cMaskFlags.pipeAligned = 1;
 				cin.cMaskFlags.rbAligned = 1;
 			} else {
 				cin.cMaskFlags.pipeAligned = !in->flags.metaPipeUnaligned;
 				cin.cMaskFlags.rbAligned = !in->flags.metaRbUnaligned;
 			}
 			cin.colorFlags = in->flags;
 			cin.resourceType = in->resourceType;
 			cin.unalignedWidth = in->width;
-- 
2.17.0



More information about the mesa-dev mailing list