From 1c975c52634172376b49f2983d4d0fd7049302f9 Mon Sep 17 00:00:00 2001 From: johnmach Date: Tue, 7 Sep 2021 15:29:33 +0530 Subject: [PATCH] Generic fixes for Linear tiling selection (#65) --- Source/GmmLib/Resource/GmmResourceInfoCommonEx.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/GmmLib/Resource/GmmResourceInfoCommonEx.cpp b/Source/GmmLib/Resource/GmmResourceInfoCommonEx.cpp index 8372484b..963723e8 100644 --- a/Source/GmmLib/Resource/GmmResourceInfoCommonEx.cpp +++ b/Source/GmmLib/Resource/GmmResourceInfoCommonEx.cpp @@ -75,8 +75,9 @@ bool GmmLib::GmmResourceInfoCommon::CopyClientParams(GMM_RESCREATE_PARAMS &Creat CreateParams.Flags.Info.TiledX = true; } } - else - { + //Auto-tiling selection if not Linear already + else if(CreateParams.Flags.Info.Linear == 0) + { // Xe_HP onwards. if((CreateParams.Flags.Info.TiledYs + CreateParams.Flags.Info.TiledYf + @@ -119,8 +120,9 @@ bool GmmLib::GmmResourceInfoCommon::CopyClientParams(GMM_RESCREATE_PARAMS &Creat } } } - else - { + //Convert non linear & non-tiledX tiling selection by client to proper tiling. + else if(CreateParams.Flags.Info.Linear + CreateParams.Flags.Info.TiledX == 0) + { if(!pGmmGlobalContext->GetSkuTable().FtrTileY) { __GMM_ASSERT(!(CreateParams.Flags.Info.TiledYs ||