Metal sync interval support (#2187)

* Metal sync interval support
Add shader name to SRGPool for debugging purposes
Set default value of rpi_vsync_interval to 1

Signed-off-by: moudgils <moudgils@amazon.com>
This commit is contained in:
moudgils
2021-07-15 11:50:19 -07:00
committed by GitHub
parent d1227d1836
commit 7ef383580e
6 changed files with 57 additions and 16 deletions
@@ -58,8 +58,8 @@ namespace AZ
RHI::ShaderResourceGroupPoolDescriptor poolDescriptor;
poolDescriptor.m_layout = shaderAsset.FindShaderResourceGroupLayout(srgName, supervariantIndex).get();
m_pool->SetName(srgName);
m_pool->SetName(AZ::Name(AZStd::string::format("%s_%s",shaderAsset.GetName().GetCStr(),srgName.GetCStr())));
const RHI::ResultCode resultCode = m_pool->Init(*device, poolDescriptor);
return resultCode;
}
@@ -27,7 +27,7 @@ void OnVsyncIntervalChanged(uint32_t const& interval)
// NOTE: On change, broadcasts the new requested vsync interval to all windows.
// The value of the vsync interval is constrained between 0 and 4
// Vsync intervals greater than 1 are not currently supported on the Vulkan RHI (see #2061 for discussion)
AZ_CVAR(uint32_t, rpi_vsync_interval, 0, OnVsyncIntervalChanged, AZ::ConsoleFunctorFlags::Null, "Set swapchain vsync interval");
AZ_CVAR(uint32_t, rpi_vsync_interval, 1, OnVsyncIntervalChanged, AZ::ConsoleFunctorFlags::Null, "Set swapchain vsync interval");
namespace AZ
{