diff --git a/Gems/Atom/Feature/Common/Assets/Passes/SMAAEdgeDetection.pass b/Gems/Atom/Feature/Common/Assets/Passes/SMAAEdgeDetection.pass index ab03ea01ef..674acdd3a0 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/SMAAEdgeDetection.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/SMAAEdgeDetection.pass @@ -15,7 +15,12 @@ { "Name": "InputDepth", "SlotType": "Input", - "ScopeAttachmentUsage": "Shader" + "ScopeAttachmentUsage": "Shader", + "ImageViewDesc": { + "AspectFlags": [ + "Depth" + ] + } }, { "Name": "OutputEdgeDetectionResult", diff --git a/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli b/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli index 10906ac09b..e8501a4a2d 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli @@ -26,8 +26,9 @@ partial ShaderResourceGroup ViewSrg // circle of confusion to screen ratio; float m_cocToScreenRatio; + [[pad_to(16)]] }; - + DepthOfFieldData m_dof; struct ExposureControlParameters diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp index c0b25697a3..298aefe8df 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp @@ -127,7 +127,7 @@ namespace AZ { RHI::Size mipSize = imageSize.GetReducedMip(mip); - RHI::ImageBindFlags imageBindFlags = RHI::ImageBindFlags::Color | RHI::ImageBindFlags::ShaderReadWrite; + RHI::ImageBindFlags imageBindFlags = RHI::ImageBindFlags::Color | RHI::ImageBindFlags::ShaderReadWrite | RHI::ImageBindFlags::CopyRead; auto transientImageDesc = RHI::ImageDescriptor::Create2D(imageBindFlags, mipSize.m_width, mipSize.m_height, RHI::Format::R16G16B16A16_FLOAT); RPI::PassAttachment* transientPassAttachment = aznew RPI::PassAttachment(); diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/DescriptorSetLayout.h b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/DescriptorSetLayout.h index 50132d62ec..2d40d21ed5 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/DescriptorSetLayout.h +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/DescriptorSetLayout.h @@ -76,7 +76,7 @@ namespace AZ const AZStd::vector& GetNativeBindingFlags() const; const RHI::ShaderResourceGroupLayout* GetShaderResourceGroupLayout() const; - static const uint32_t MaxUnboundedArrayDescriptors = (1024 * 1024 * 2); // 2M + static const uint32_t MaxUnboundedArrayDescriptors = 900000; //Using this number as it needs to be less than maxDescriptorSetSampledImages limit of 1048576 bool GetHasUnboundedArray() const { return m_hasUnboundedArray; } private: diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/SwapChain.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/SwapChain.cpp index 47c92d97fb..67f4834524 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/SwapChain.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/SwapChain.cpp @@ -483,12 +483,18 @@ namespace AZ void SwapChain::InvalidateNativeSwapChain() { auto& device = static_cast(GetDevice()); - vkDeviceWaitIdle(device.GetNativeDevice()); - if (m_nativeSwapChain != VK_NULL_HANDLE) + auto presentCommand = [this, &device]([[maybe_unused]] void* queue) { - vkDestroySwapchainKHR(device.GetNativeDevice(), m_nativeSwapChain, nullptr); - m_nativeSwapChain = VK_NULL_HANDLE; - } + vkDeviceWaitIdle(device.GetNativeDevice()); + if (m_nativeSwapChain != VK_NULL_HANDLE) + { + vkDestroySwapchainKHR(device.GetNativeDevice(), m_nativeSwapChain, nullptr); + m_nativeSwapChain = VK_NULL_HANDLE; + } + }; + + m_presentationQueue->QueueCommand(AZStd::move(presentCommand)); + m_presentationQueue->FlushCommands(); } RHI::ResultCode SwapChain::CreateSwapchain() @@ -496,7 +502,7 @@ namespace AZ auto& device = static_cast(GetDevice()); m_surfaceCapabilities = GetSurfaceCapabilities(); - m_surfaceFormat = GetSupportedSurfaceFormat(GetDescriptor().m_dimensions.m_imageFormat); + m_surfaceFormat = GetSupportedSurfaceFormat(m_dimensions.m_imageFormat); m_presentMode = GetSupportedPresentMode(GetDescriptor().m_verticalSyncInterval); m_compositeAlphaFlagBits = GetSupportedCompositeAlpha();