[ATOM][RHI][Vulkan] Make sure to set super-variant for non-MSAA pipel… (#4134)
* [ATOM][RHI][Vulkan] Make sure to set super-variant for non-MSAA pipeline. Separate out reflection probe draw packet checks. Signed-off-by: Peng <tonypeng@amazon.com> * Missed from previous commit to make sure non-MSAA super-variant is used. Signed-off-by: Peng <tonypeng@amazon.com> * Minor comment edit. Signed-off-by: Peng <tonypeng@amazon.com>
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <Atom/RPI.Public/ViewportContextBus.h>
|
||||
#include <Atom/RPI.Public/RPISystemInterface.h>
|
||||
#include <Atom/RPI.Public/Shader/ShaderResourceGroup.h>
|
||||
#include <Atom/RPI.Public/Shader/ShaderSystem.h>
|
||||
|
||||
#include <Atom/Bootstrap/DefaultWindowBus.h>
|
||||
#include <Atom/Bootstrap/BootstrapNotificationBus.h>
|
||||
@@ -303,6 +304,11 @@ namespace AZ
|
||||
RPI::RenderPipelineDescriptor renderPipelineDescriptor = *RPI::GetDataFromAnyAsset<RPI::RenderPipelineDescriptor>(pipelineAsset);
|
||||
renderPipelineDescriptor.m_name = AZStd::string::format("%s_%i", renderPipelineDescriptor.m_name.c_str(), viewportContext->GetId());
|
||||
|
||||
// Make sure non-msaa super variant is used for non-msaa pipeline
|
||||
bool isNonMsaaPipeline = (renderPipelineDescriptor.m_renderSettings.m_multisampleState.m_samples == 1);
|
||||
const char* supervariantName = isNonMsaaPipeline ? AZ::RPI::NoMsaaSupervariantName : "";
|
||||
AZ::RPI::ShaderSystemInterface::Get()->SetSupervariantName(AZ::Name(supervariantName));
|
||||
|
||||
if (!scene->GetRenderPipeline(AZ::Name(renderPipelineDescriptor.m_name)))
|
||||
{
|
||||
RPI::RenderPipelinePtr renderPipeline = RPI::RenderPipeline::CreateRenderPipelineForWindow(renderPipelineDescriptor, *viewportContext->GetWindowContext().get());
|
||||
|
||||
@@ -370,11 +370,27 @@ namespace AZ
|
||||
{
|
||||
// set draw list mask
|
||||
m_cullable.m_cullData.m_drawListMask.reset();
|
||||
m_cullable.m_cullData.m_drawListMask =
|
||||
m_stencilDrawPacket->GetDrawListMask() |
|
||||
m_blendWeightDrawPacket->GetDrawListMask() |
|
||||
m_renderOuterDrawPacket->GetDrawListMask() |
|
||||
m_renderInnerDrawPacket->GetDrawListMask();
|
||||
|
||||
// check for draw packets due certain render pipelines such as lowend render pipeline that might not have this feature enabled
|
||||
if (m_stencilDrawPacket)
|
||||
{
|
||||
m_cullable.m_cullData.m_drawListMask |= m_stencilDrawPacket->GetDrawListMask();
|
||||
}
|
||||
|
||||
if (m_blendWeightDrawPacket)
|
||||
{
|
||||
m_cullable.m_cullData.m_drawListMask |= m_blendWeightDrawPacket->GetDrawListMask();
|
||||
}
|
||||
|
||||
if (m_renderOuterDrawPacket)
|
||||
{
|
||||
m_cullable.m_cullData.m_drawListMask |= m_renderOuterDrawPacket->GetDrawListMask();
|
||||
}
|
||||
|
||||
if (m_renderInnerDrawPacket)
|
||||
{
|
||||
m_cullable.m_cullData.m_drawListMask |= m_renderInnerDrawPacket->GetDrawListMask();
|
||||
}
|
||||
|
||||
// setup the Lod entry, using one entry for all four draw packets
|
||||
m_cullable.m_lodData.m_lods.clear();
|
||||
|
||||
Reference in New Issue
Block a user