From a8a60eeea71d33c972a406c92d941af2f37bb77e Mon Sep 17 00:00:00 2001 From: Peng Date: Mon, 26 Apr 2021 18:12:50 -0700 Subject: [PATCH] ATOM-14947 -Fix vulkan graphics pipeline creation failure having depth clamp off with devices not supporting depth clip. -Added reason for the mobile version of screen space reflection --- .../Atom/Feature/Common/Assets/Passes/Reflections_nomsaa.pass | 2 ++ Gems/Atom/RHI/Vulkan/Code/Source/RHI/GraphicsPipeline.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Gems/Atom/Feature/Common/Assets/Passes/Reflections_nomsaa.pass b/Gems/Atom/Feature/Common/Assets/Passes/Reflections_nomsaa.pass index 498b751e0e..a35352b9f0 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/Reflections_nomsaa.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/Reflections_nomsaa.pass @@ -247,6 +247,8 @@ } }, { + // Using cut-down version of screen space reflection for handling the attachment format compatibility issues. + // This is used for mobile devices with limited capabilities. "Name": "ReflectionScreenSpaceMobilePass", "TemplateName": "ReflectionScreenSpaceMobilePassTemplate", "Enabled": false, diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/GraphicsPipeline.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/GraphicsPipeline.cpp index 7b39e56274..605fd6abb1 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/GraphicsPipeline.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/GraphicsPipeline.cpp @@ -287,8 +287,8 @@ namespace AZ } else if (!rasterState.m_depthClipEnable) { - AZ_Error("Vulkan", false, "Depth clipping is being used but it's not supported on this device"); - return RHI::ResultCode::InvalidArgument; + // depth clamp must be disabled if physical device does not support it + info.depthClampEnable = VK_FALSE; } switch (rasterState.m_fillMode)