Add DisplayPageTables Support and update GT_SYSTEM_INFO (#61)
diff --git a/Source/GmmLib/Texture/GmmGen11Texture.cpp b/Source/GmmLib/Texture/GmmGen11Texture.cpp
index c7f2daf..2642faa 100644
--- a/Source/GmmLib/Texture/GmmGen11Texture.cpp
+++ b/Source/GmmLib/Texture/GmmGen11Texture.cpp
@@ -369,6 +369,21 @@
*pUOffsetY += pTexInfo->OffsetInfo.Plane.Y[GMM_PLANE_Y];
*pVOffsetY = *pUOffsetY;
}
+
+ // This is needed for FtrDisplayPageTables
+ if(pGmmGlobalContext->GetSkuTable().FtrDisplayPageTables)
+ {
+ pTexInfo->OffsetInfo.Plane.Aligned.Height[GMM_PLANE_Y] = GFX_ALIGN(YHeight, TileHeight);
+ if(pTexInfo->OffsetInfo.Plane.NoOfPlanes == 2)
+ {
+ pTexInfo->OffsetInfo.Plane.Aligned.Height[GMM_PLANE_U] = GFX_ALIGN(VHeight, TileHeight);
+ }
+ else if(pTexInfo->OffsetInfo.Plane.NoOfPlanes == 3)
+ {
+ pTexInfo->OffsetInfo.Plane.Aligned.Height[GMM_PLANE_U] =
+ pTexInfo->OffsetInfo.Plane.Aligned.Height[GMM_PLANE_V] = GFX_ALIGN(VHeight, TileHeight);
+ }
+ }
}
//Special case LKF MMC compressed surfaces
diff --git a/Source/GmmLib/inc/External/Common/GmmTextureExt.h b/Source/GmmLib/inc/External/Common/GmmTextureExt.h
index 65e57b9..9ba80c1 100644
--- a/Source/GmmLib/inc/External/Common/GmmTextureExt.h
+++ b/Source/GmmLib/inc/External/Common/GmmTextureExt.h
@@ -47,7 +47,7 @@
struct
{
GMM_GFX_SIZE_T Height[GMM_MAX_PLANE];
- } UnAligned;
+ } UnAligned, Aligned;
uint32_t NoOfPlanes;
bool IsTileAlignedPlanes;
}GMM_PLANAR_OFFSET_INFO;
diff --git a/Source/inc/common/gtsysinfo.h b/Source/inc/common/gtsysinfo.h
index c028d66..0d05ec5 100644
--- a/Source/inc/common/gtsysinfo.h
+++ b/Source/inc/common/gtsysinfo.h
@@ -282,6 +282,8 @@
uint32_t NumThreadsPerEu; // Number of threads per EU.
GT_CACHE_TYPES CacheTypes; // Types of caches available on system (L3/LLC/eDRAM).
uint32_t MaxVECS; // Max VECS instances.
+ uint32_t MemoryType; // GT_MEMORY_TYPES - type of memory supported in current platform
+
} GT_SYSTEM_INFO, *PGT_SYSTEM_INFO;
#pragma pack(pop)
diff --git a/Source/inc/common/sku_wa.h b/Source/inc/common/sku_wa.h
index d005a63..c358a43 100644
--- a/Source/inc/common/sku_wa.h
+++ b/Source/inc/common/sku_wa.h
@@ -104,6 +104,7 @@
unsigned int FtrFlatPhysCCS : 1; // XeHP compression ie flat physical CCS
unsigned int FtrDisplayXTiling : 1; // Fallback to Legacy TileX Display, used for Pre-SI platforms.
unsigned int FtrMultiTileArch : 1;
+ unsigned int FtrDisplayPageTables : 1; // Display Page Tables: 2-Level Page walk for Displayable Frame buffers in GGTT.
};