Allow error message to be formatted

This commit is contained in:
SirLynix
2023-08-14 23:16:37 +02:00
committed by Jérôme Leclercq
parent 25957c4b7f
commit a741672a51
119 changed files with 707 additions and 490 deletions

View File

@@ -66,14 +66,14 @@ namespace Nz
const auto& arrayType = std::get<nzsl::Ast::ArrayType>(*varType);
const auto& innerType = arrayType.containedType->type;
if (!IsSamplerType(innerType))
throw std::runtime_error("unexpected type " + ToString(innerType) + " in array " + ToString(arrayType));
throw std::runtime_error("unexpected type " + nzsl::Ast::ToString(innerType) + " in array " + nzsl::Ast::ToString(arrayType));
arraySize = arrayType.length;
bindingType = ShaderBindingType::Sampler;
varType = &innerType;
}
else
throw std::runtime_error("unexpected type " + ToString(varType));
throw std::runtime_error("unexpected type " + nzsl::Ast::ToString(varType));
// TODO: Get more precise shader stage type
m_pipelineLayoutInfo.bindings.push_back({