Skip to content

Commit

Permalink
Support platform specific KeepTileYForFlattened setting
Browse files Browse the repository at this point in the history
Change KeepTileYForFlattened regkey to allow platform default setting.
  • Loading branch information
iwwu authored and igcbot committed Oct 10, 2023
1 parent ec6b918 commit 1f61d8b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion IGC/Compiler/CISACodeGen/ComputeShaderBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ namespace IGC
MMD->csInfo.neededThreadIdLayout == ThreadIDLayout::X;
if (m_Platform->supportHWGenerateTID() && m_DriverInfo->SupportHWGenerateTID())
{
if (IGC_IS_FLAG_DISABLED(KeepTileYForFlattened) && useLinearWalk)
// If KeepTileYForFlattened == 2, use the platform default value.
// Otherwise 0 is forced off, 1 is forced on.
bool KeepTileYForFlattenedValue = IGC_GET_FLAG_VALUE(KeepTileYForFlattened) == 2 ?
m_Platform->EnableKeepTileYForFlattenedDefault() :
IGC_IS_FLAG_ENABLED(KeepTileYForFlattened);
if (!KeepTileYForFlattenedValue && useLinearWalk)
{
needsLinearWalk = true;
}
Expand Down
5 changes: 5 additions & 0 deletions IGC/Compiler/CISACodeGen/Platform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,11 @@ bool EnableNewTileYCheckDefault() const
return (m_platformInfo.eProductFamily == IGFX_DG2);
}

bool EnableKeepTileYForFlattenedDefault() const
{
return false;
}

bool needsWAForThreadsUtilization() const
{
return (m_platformInfo.eProductFamily == IGFX_DG2 ||
Expand Down
2 changes: 1 addition & 1 deletion IGC/common/igc_flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ DECLARE_IGC_REGKEY(bool, ForceAddressArithSinking, false, "Force sinking
DECLARE_IGC_REGKEY(bool, SetDefaultTileYWalk, true, "Use TileY walk as default for HW generating threadID", true)
DECLARE_IGC_REGKEY(bool, ForceTileY, false, "Force TileY mode on DG2", false)
DECLARE_IGC_REGKEY(DWORD, EnableNewTileYCheck, 2, "Enable new TileY check. 0 - off, 1 - on, 2 - platform default", false)
DECLARE_IGC_REGKEY(bool, KeepTileYForFlattened, false, "Keep TileY for FlattenedThreadIdInGroup on DG2", false)
DECLARE_IGC_REGKEY(DWORD, KeepTileYForFlattened, 2, "Keep TileY for FlattenedThreadIdInGroup. 0 - off, 1 - on, 2 - platform default", false)

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

0 comments on commit 1f61d8b

Please sign in to comment.