From cebf6e2de3dbb809e10a2df070e4390481f3c170 Mon Sep 17 00:00:00 2001 From: rgba16f <82187279+rgba16f@users.noreply.github.com> Date: Wed, 10 Nov 2021 14:08:55 -0600 Subject: [PATCH] Atom CPU threading optimization (#5481) * Small change to make the RasterPass Scope jobs split the work more evenly over the cores Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com> * Update with PR feedback. Remove scale of EstimatedItemCount, modify the command list cost threshold instead Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com> --- .../Include/Atom/RHI.Reflect/DX12/PlatformLimitsDescriptor.h | 2 +- .../Include/Atom/RHI.Reflect/Metal/PlatformLimitsDescriptor.h | 2 +- .../Include/Atom/RHI.Reflect/Vulkan/PlatformLimitsDescriptor.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gems/Atom/RHI/DX12/Code/Include/Atom/RHI.Reflect/DX12/PlatformLimitsDescriptor.h b/Gems/Atom/RHI/DX12/Code/Include/Atom/RHI.Reflect/DX12/PlatformLimitsDescriptor.h index 63c2d69ea2..1a447693c2 100644 --- a/Gems/Atom/RHI/DX12/Code/Include/Atom/RHI.Reflect/DX12/PlatformLimitsDescriptor.h +++ b/Gems/Atom/RHI/DX12/Code/Include/Atom/RHI.Reflect/DX12/PlatformLimitsDescriptor.h @@ -40,7 +40,7 @@ namespace AZ uint32_t m_swapChainsPerCommandList = 8; // The maximum cost that can be associated with a single command list. - uint32_t m_commandListCostThresholdMin = 1000; + uint32_t m_commandListCostThresholdMin = 250; // The maximum number of command lists per scope. uint32_t m_commandListsPerScopeMax = 16; diff --git a/Gems/Atom/RHI/Metal/Code/Include/Atom/RHI.Reflect/Metal/PlatformLimitsDescriptor.h b/Gems/Atom/RHI/Metal/Code/Include/Atom/RHI.Reflect/Metal/PlatformLimitsDescriptor.h index 375b532d39..bd52c37a67 100644 --- a/Gems/Atom/RHI/Metal/Code/Include/Atom/RHI.Reflect/Metal/PlatformLimitsDescriptor.h +++ b/Gems/Atom/RHI/Metal/Code/Include/Atom/RHI.Reflect/Metal/PlatformLimitsDescriptor.h @@ -31,7 +31,7 @@ namespace AZ uint32_t m_swapChainsPerCommandList = 8; // The maximum cost that can be associated with a single command list. - uint32_t m_commandListCostThresholdMin = 1000; + uint32_t m_commandListCostThresholdMin = 250; // The maximum number of command lists per scope. uint32_t m_commandListsPerScopeMax = 16; diff --git a/Gems/Atom/RHI/Vulkan/Code/Include/Atom/RHI.Reflect/Vulkan/PlatformLimitsDescriptor.h b/Gems/Atom/RHI/Vulkan/Code/Include/Atom/RHI.Reflect/Vulkan/PlatformLimitsDescriptor.h index 5e41da9627..eaa4356796 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Include/Atom/RHI.Reflect/Vulkan/PlatformLimitsDescriptor.h +++ b/Gems/Atom/RHI/Vulkan/Code/Include/Atom/RHI.Reflect/Vulkan/PlatformLimitsDescriptor.h @@ -33,7 +33,7 @@ namespace AZ uint32_t m_swapChainsPerCommandList = 8; // The maximum cost that can be associated with a single command list. - uint32_t m_commandListCostThresholdMin = 1000; + uint32_t m_commandListCostThresholdMin = 250; // The maximum number of command lists per scope. uint32_t m_commandListsPerScopeMax = 16;