Skip to content

Commit 1257007

Browse files
jaladreipsigcbot
authored andcommitted
Simplify RQ throttling keys
Replace DisableRayQueryDynamicRayManagementMechanism and ForceRayQueryDynamicRayManagementMechanism with one key: OverrideRayQueryThrottling. OverrideRayQueryThrottling is ignored when it's not set. When set, 0 will disable RQ throttling while 1 will enable RQ throttling.
1 parent 7aee973 commit 1257007

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

IGC/AdaptorCommon/RayTracing/RayTracingInterface.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ void RayTracingInlineLowering(CodeGenContext* pContext)
145145
if (IGC_IS_FLAG_ENABLED(OverrideTMax))
146146
mpm.add(createOverrideTMaxPass(IGC_GET_FLAG_VALUE(OverrideTMax)));
147147

148-
if (pContext->platform.isDynamicRayQueryDynamicRayManagementMechanismEnabled() && pContext->getModuleMetaData()->compOpt.EnableDynamicRQManagement ||
149-
IGC_IS_FLAG_ENABLED(ForceRayQueryDynamicRayManagementMechanism))
148+
if (pContext->platform.enableRayQueryThrottling(pContext->getModuleMetaData()->compOpt.EnableDynamicRQManagement))
150149
{
151150
mpm.add(CreateDynamicRayManagementPass());
152151
}

IGC/Compiler/CISACodeGen/Platform.hpp

+13-3
Original file line numberDiff line numberDiff line change
@@ -1541,10 +1541,20 @@ bool supportsProgrammableOffsets() const
15411541
return isCoreChildOf(IGFX_XE2_HPG_CORE);
15421542
}
15431543

1544-
bool isDynamicRayQueryDynamicRayManagementMechanismEnabled() const
1544+
bool supportsRayQueryThrottling() const
15451545
{
1546-
return (isCoreChildOf(IGFX_XE2_HPG_CORE) &&
1547-
IGC_IS_FLAG_DISABLED(DisableRayQueryDynamicRayManagementMechanism));
1546+
return isCoreChildOf(IGFX_XE2_HPG_CORE);
1547+
}
1548+
1549+
bool enableRayQueryThrottling(bool enableByDefault) const
1550+
{
1551+
if (!supportsRayQueryThrottling())
1552+
return false;
1553+
1554+
if (IGC_IS_FLAG_SET(OverrideRayQueryThrottling))
1555+
return IGC_GET_FLAG_VALUE(OverrideRayQueryThrottling);
1556+
1557+
return enableByDefault;
15481558
}
15491559

15501560
bool isSWSubTriangleOpacityCullingEmulationEnabled() const

IGC/common/igc_flags.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -1045,8 +1045,7 @@ DECLARE_IGC_GROUP("Raytracing Options")
10451045
DECLARE_IGC_REGKEY(bool, EnableRTPrintf, false, "Enable printf for ray tracing.", true)
10461046
DECLARE_IGC_REGKEY(DWORD, PrintfBufferSize, 0, "Set printf buffer size. Unit: KB.", true)
10471047
DECLARE_IGC_REGKEY(bool, DisableRayQueryReturnOptimization, false, "RayQuery Return Optimization", true)
1048-
DECLARE_IGC_REGKEY(bool, DisableRayQueryDynamicRayManagementMechanism, true, "Dynamic ray management mechanism for Synchronous Ray Tracing", true)
1049-
DECLARE_IGC_REGKEY(bool, ForceRayQueryDynamicRayManagementMechanism, false, "Force dynamic ray management regardless of other disable mechanisms", true)
1048+
DECLARE_IGC_REGKEY(bool, OverrideRayQueryThrottling, false, "Force rayquery throttling (dynamic ray management) to be enabled or disabled. Default value of this key is ignored", true)
10501049
DECLARE_IGC_REGKEY(bool, DisableRayQueryDynamicRayManagementMechanismForExternalFunctionsCalls, false, "Disable dynamic ray management mechanism for shaders with external functions calls", true)
10511050
DECLARE_IGC_REGKEY(bool, DisableRayQueryDynamicRayManagementMechanismForBarriers, false, "Disable dynamic ray management mechanism for shaders with barriers", true)
10521051
DECLARE_IGC_REGKEY(bool, EnableOuterLoopHoistingForRayQueryDynamicRayManagementMechanism, false, "Disable dynamic ray management mechanism for shaders with barriers", true)

0 commit comments

Comments
 (0)