Skip to content

Commit 78ccfbb

Browse files
authored
Qpitch value for MSAA enabled color surface (#4)
1 parent 1598c1b commit 78ccfbb

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

Source/GmmLib/Texture/GmmGen9Texture.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,17 @@ void GmmLib::GmmGen9TextureCalc::Fill2DTexOffsetAddress(GMM_TEXTURE_INFO *pTexIn
580580
}
581581

582582
// Calculate the overall Block height...Mip0Height + Max(Mip1Height, Sum of Mip2Height..MipnHeight)
583-
ArrayQPitch = Get2DMipMapTotalHeight(pTexInfo);
584-
ArrayQPitch = GFX_ALIGN_NP2(ArrayQPitch, Alignment);
583+
ArrayQPitch = Get2DMipMapTotalHeight(pTexInfo);
584+
ArrayQPitch = GFX_ALIGN_NP2(ArrayQPitch, Alignment);
585+
586+
// Color Surf with MSAA Enabled Mutiply 4
587+
if((pTexInfo->Flags.Info.TiledYs) && (!pGmmGlobalContext->GetSkuTable().FtrTileY) &&
588+
((pTexInfo->MSAA.NumSamples == 8) && (pTexInfo->MSAA.NumSamples == 16)) &&
589+
((pTexInfo->Flags.Gpu.Depth == 0) && (pTexInfo->Flags.Gpu.SeparateStencil == 0)))
590+
{
591+
ArrayQPitch *= 4; /* Aligned height of 4 samples */
592+
}
593+
585594
pTexInfo->Alignment.QPitch = ArrayQPitch;
586595

587596
if(GmmIsCompressed(pTexInfo->Format))
@@ -1237,4 +1246,4 @@ GMM_STATUS GMM_STDCALL GmmLib::GmmGen9TextureCalc::MSAACCSUsage(GMM_TEXTURE_INFO
12371246
}
12381247
}
12391248
return Status;
1240-
}
1249+
}

0 commit comments

Comments
 (0)