From db14d378057ccc2a98246cdc9da0b2d912a5843d Mon Sep 17 00:00:00 2001 From: Dihara Wijetunga <84074485+DiharaWijetunga@users.noreply.github.com> Date: Thu, 16 Sep 2021 18:08:34 +0100 Subject: [PATCH] Fixed crash in Atom Vulkan RHI when physical device limits timestampComputeAndGraphics is false (#4051) * Fixed crash in Atom Vulkan RHI when physical device limits timestampComputeAndGraphics is false. Signed-off-by: Dihara Wijetunga * Revert "Fixed crash in Atom Vulkan RHI when physical device limits timestampComputeAndGraphics is false." This reverts commit f2b7d4eb704ef13701cb66b6b5802cb4e5eb9632. Signed-off-by: Dihara Wijetunga * Moved ATOM Vulkan RHI Device::InitFeaturesAndLimits() after m_commandQueueContext is initialized. Signed-off-by: Dihara Wijetunga --- Gems/Atom/RHI/Vulkan/Code/Source/RHI/Device.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Device.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Device.cpp index 4f800f114b..35bc966d1d 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Device.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Device.cpp @@ -235,8 +235,6 @@ namespace AZ //Load device features now that we have loaded all extension info physicalDevice.LoadSupportedFeatures(); - - InitFeaturesAndLimits(physicalDevice); return RHI::ResultCode::Success; } @@ -247,6 +245,8 @@ namespace AZ RHI::ResultCode result = m_commandQueueContext.Init(*this, commandQueueContextDescriptor); RETURN_RESULT_IF_UNSUCCESSFUL(result); + InitFeaturesAndLimits(static_cast(GetPhysicalDevice())); + // Initialize member variables. ReleaseQueue::Descriptor releaseQueueDescriptor; releaseQueueDescriptor.m_collectLatency = m_descriptor.m_frameCountMax - 1;