Temp fix for NZSL update
This commit is contained in:
@@ -49,10 +49,11 @@ namespace Nz
|
||||
|
||||
renderPipelineInfo.pipelineLayout = m_pipelineInfo.settings->GetRenderPipelineLayout();
|
||||
|
||||
std::unordered_map<UInt32, nzsl::Ast::ConstantValue> optionValues;
|
||||
std::unordered_map<UInt32, nzsl::Ast::ConstantSingleValue> optionValues;
|
||||
for (std::size_t i = 0; i < m_pipelineInfo.optionCount; ++i)
|
||||
{
|
||||
const auto& option = m_pipelineInfo.optionValues[i];
|
||||
|
||||
optionValues[option.hash] = option.value;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,14 @@ namespace Nz
|
||||
if (it == m_combinations.end())
|
||||
{
|
||||
nzsl::ShaderWriter::States states;
|
||||
states.optionValues = config.optionValues;
|
||||
// TODO: Remove this when arrays are accepted as config values
|
||||
for (const auto& [optionHash, optionValue] : config.optionValues)
|
||||
{
|
||||
std::visit([&](auto&& arg)
|
||||
{
|
||||
states.optionValues[optionHash] = arg;
|
||||
}, optionValue);
|
||||
}
|
||||
states.shaderModuleResolver = Graphics::Instance()->GetShaderModuleResolver();
|
||||
|
||||
std::shared_ptr<ShaderModule> stage = Graphics::Instance()->GetRenderDevice()->InstantiateShaderModule(m_shaderStages, *m_shaderModule, std::move(states));
|
||||
|
||||
Reference in New Issue
Block a user