Minor stuff (mostly to shut up static analysis)

This commit is contained in:
Jérôme Leclercq 2022-02-23 13:20:06 +01:00
parent 1e9e05adfa
commit f38d2747b8
3 changed files with 4 additions and 8 deletions

View File

@ -134,10 +134,7 @@ namespace Nz
depthPrepass.SetExecutionCallback([&]() depthPrepass.SetExecutionCallback([&]()
{ {
if (m_rebuildCommandBuffer) return (m_rebuildCommandBuffer) ? FramePassExecution::UpdateAndExecute : FramePassExecution::Execute;
return FramePassExecution::UpdateAndExecute;
else
return FramePassExecution::Execute;
}); });
depthPrepass.SetCommandCallback([this](CommandBufferBuilder& builder, const Recti& /*renderRect*/) depthPrepass.SetCommandCallback([this](CommandBufferBuilder& builder, const Recti& /*renderRect*/)

View File

@ -279,10 +279,7 @@ namespace Nz
forwardPass.SetExecutionCallback([&]() forwardPass.SetExecutionCallback([&]()
{ {
if (m_rebuildCommandBuffer) return (m_rebuildCommandBuffer) ? FramePassExecution::UpdateAndExecute : FramePassExecution::Execute;
return FramePassExecution::UpdateAndExecute;
else
return FramePassExecution::Execute;
}); });
forwardPass.SetCommandCallback([this](CommandBufferBuilder& builder, const Recti& /*renderRect*/) forwardPass.SetCommandCallback([this](CommandBufferBuilder& builder, const Recti& /*renderRect*/)

View File

@ -114,6 +114,7 @@ namespace Nz
const auto& matSettings = materialPass.GetSettings(); const auto& matSettings = materialPass.GetSettings();
if (std::size_t bindingIndex = matSettings->GetPredefinedBinding(PredefinedShaderBinding::InstanceDataUbo); bindingIndex != MaterialSettings::InvalidIndex) if (std::size_t bindingIndex = matSettings->GetPredefinedBinding(PredefinedShaderBinding::InstanceDataUbo); bindingIndex != MaterialSettings::InvalidIndex)
{ {
assert(currentWorldInstance);
const auto& instanceBuffer = currentWorldInstance->GetInstanceBuffer(); const auto& instanceBuffer = currentWorldInstance->GetInstanceBuffer();
auto& bindingEntry = m_bindingCache.emplace_back(); auto& bindingEntry = m_bindingCache.emplace_back();
@ -155,6 +156,7 @@ namespace Nz
}; };
} }
assert(currentPipeline);
ShaderBindingPtr drawDataBinding = currentPipeline->GetPipelineInfo().pipelineLayout->AllocateShaderBinding(0); ShaderBindingPtr drawDataBinding = currentPipeline->GetPipelineInfo().pipelineLayout->AllocateShaderBinding(0);
drawDataBinding->Update(m_bindingCache.data(), m_bindingCache.size()); drawDataBinding->Update(m_bindingCache.data(), m_bindingCache.size());