Skip to content

Commit 1f61d8b

Browse files
iwwuigcbot
authored andcommitted
Support platform specific KeepTileYForFlattened setting
Change KeepTileYForFlattened regkey to allow platform default setting.
1 parent ec6b918 commit 1f61d8b

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

IGC/Compiler/CISACodeGen/ComputeShaderBase.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ namespace IGC
6666
MMD->csInfo.neededThreadIdLayout == ThreadIDLayout::X;
6767
if (m_Platform->supportHWGenerateTID() && m_DriverInfo->SupportHWGenerateTID())
6868
{
69-
if (IGC_IS_FLAG_DISABLED(KeepTileYForFlattened) && useLinearWalk)
69+
// If KeepTileYForFlattened == 2, use the platform default value.
70+
// Otherwise 0 is forced off, 1 is forced on.
71+
bool KeepTileYForFlattenedValue = IGC_GET_FLAG_VALUE(KeepTileYForFlattened) == 2 ?
72+
m_Platform->EnableKeepTileYForFlattenedDefault() :
73+
IGC_IS_FLAG_ENABLED(KeepTileYForFlattened);
74+
if (!KeepTileYForFlattenedValue && useLinearWalk)
7075
{
7176
needsLinearWalk = true;
7277
}

IGC/Compiler/CISACodeGen/Platform.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,11 @@ bool EnableNewTileYCheckDefault() const
964964
return (m_platformInfo.eProductFamily == IGFX_DG2);
965965
}
966966

967+
bool EnableKeepTileYForFlattenedDefault() const
968+
{
969+
return false;
970+
}
971+
967972
bool needsWAForThreadsUtilization() const
968973
{
969974
return (m_platformInfo.eProductFamily == IGFX_DG2 ||

IGC/common/igc_flags.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ DECLARE_IGC_REGKEY(bool, ForceAddressArithSinking, false, "Force sinking
241241
DECLARE_IGC_REGKEY(bool, SetDefaultTileYWalk, true, "Use TileY walk as default for HW generating threadID", true)
242242
DECLARE_IGC_REGKEY(bool, ForceTileY, false, "Force TileY mode on DG2", false)
243243
DECLARE_IGC_REGKEY(DWORD, EnableNewTileYCheck, 2, "Enable new TileY check. 0 - off, 1 - on, 2 - platform default", false)
244-
DECLARE_IGC_REGKEY(bool, KeepTileYForFlattened, false, "Keep TileY for FlattenedThreadIdInGroup on DG2", false)
244+
DECLARE_IGC_REGKEY(DWORD, KeepTileYForFlattened, 2, "Keep TileY for FlattenedThreadIdInGroup. 0 - off, 1 - on, 2 - platform default", false)
245245

246246
DECLARE_IGC_REGKEY(bool, DisableDynamicTextureFolding, false, "Disable Dynamic Texture Folding", false)
247247
DECLARE_IGC_REGKEY(bool, DisableDynamicResInfoFolding, true, "Disable Dynamic ResInfo Instruction Folding", false)

0 commit comments

Comments
 (0)