Skip to content

Commit 3d2209b

Browse files
authored
Add DisplayPageTables Support and update GT_SYSTEM_INFO (#61)
1 parent 6c6f75d commit 3d2209b

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

Source/GmmLib/Texture/GmmGen11Texture.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,21 @@ void GmmLib::GmmGen11TextureCalc::FillPlanarOffsetAddress(GMM_TEXTURE_INFO *pTex
369369
*pUOffsetY += pTexInfo->OffsetInfo.Plane.Y[GMM_PLANE_Y];
370370
*pVOffsetY = *pUOffsetY;
371371
}
372+
373+
// This is needed for FtrDisplayPageTables
374+
if(pGmmGlobalContext->GetSkuTable().FtrDisplayPageTables)
375+
{
376+
pTexInfo->OffsetInfo.Plane.Aligned.Height[GMM_PLANE_Y] = GFX_ALIGN(YHeight, TileHeight);
377+
if(pTexInfo->OffsetInfo.Plane.NoOfPlanes == 2)
378+
{
379+
pTexInfo->OffsetInfo.Plane.Aligned.Height[GMM_PLANE_U] = GFX_ALIGN(VHeight, TileHeight);
380+
}
381+
else if(pTexInfo->OffsetInfo.Plane.NoOfPlanes == 3)
382+
{
383+
pTexInfo->OffsetInfo.Plane.Aligned.Height[GMM_PLANE_U] =
384+
pTexInfo->OffsetInfo.Plane.Aligned.Height[GMM_PLANE_V] = GFX_ALIGN(VHeight, TileHeight);
385+
}
386+
}
372387
}
373388

374389
//Special case LKF MMC compressed surfaces

Source/GmmLib/inc/External/Common/GmmTextureExt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ typedef struct GMM_PLANAR_OFFSET_INFO_REC
4747
struct
4848
{
4949
GMM_GFX_SIZE_T Height[GMM_MAX_PLANE];
50-
} UnAligned;
50+
} UnAligned, Aligned;
5151
uint32_t NoOfPlanes;
5252
bool IsTileAlignedPlanes;
5353
}GMM_PLANAR_OFFSET_INFO;

Source/inc/common/gtsysinfo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ typedef struct GT_SYSTEM_INFO
282282
uint32_t NumThreadsPerEu; // Number of threads per EU.
283283
GT_CACHE_TYPES CacheTypes; // Types of caches available on system (L3/LLC/eDRAM).
284284
uint32_t MaxVECS; // Max VECS instances.
285+
uint32_t MemoryType; // GT_MEMORY_TYPES - type of memory supported in current platform
286+
285287
} GT_SYSTEM_INFO, *PGT_SYSTEM_INFO;
286288

287289
#pragma pack(pop)

Source/inc/common/sku_wa.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ typedef struct _SKU_FEATURE_TABLE
104104
unsigned int FtrFlatPhysCCS : 1; // XeHP compression ie flat physical CCS
105105
unsigned int FtrDisplayXTiling : 1; // Fallback to Legacy TileX Display, used for Pre-SI platforms.
106106
unsigned int FtrMultiTileArch : 1;
107+
unsigned int FtrDisplayPageTables : 1; // Display Page Tables: 2-Level Page walk for Displayable Frame buffers in GGTT.
107108
};
108109

109110

0 commit comments

Comments
 (0)