Compilation fixes
This commit is contained in:
parent
c87affe276
commit
36120b9501
|
|
@ -23,7 +23,7 @@ namespace Nz
|
||||||
SpirvPrinter(SpirvPrinter&&) = default;
|
SpirvPrinter(SpirvPrinter&&) = default;
|
||||||
~SpirvPrinter() = default;
|
~SpirvPrinter() = default;
|
||||||
|
|
||||||
std::string Print(const UInt32* codepoints, std::size_t count, const Settings& settings = Settings());
|
std::string Print(const UInt32* codepoints, std::size_t count, const Settings& settings = {});
|
||||||
|
|
||||||
SpirvPrinter& operator=(const SpirvPrinter&) = default;
|
SpirvPrinter& operator=(const SpirvPrinter&) = default;
|
||||||
SpirvPrinter& operator=(SpirvPrinter&&) = default;
|
SpirvPrinter& operator=(SpirvPrinter&&) = default;
|
||||||
|
|
|
||||||
|
|
@ -501,14 +501,16 @@ namespace Nz
|
||||||
if (!variable.debugName.empty())
|
if (!variable.debugName.empty())
|
||||||
debugInfos.Append(SpirvOp::OpName, resultId, variable.debugName);
|
debugInfos.Append(SpirvOp::OpName, resultId, variable.debugName);
|
||||||
|
|
||||||
|
const auto& var = variable;
|
||||||
|
|
||||||
constants.AppendVariadic(SpirvOp::OpVariable, [&](const auto& appender)
|
constants.AppendVariadic(SpirvOp::OpVariable, [&](const auto& appender)
|
||||||
{
|
{
|
||||||
appender(GetId(*variable.type));
|
appender(GetId(*var.type));
|
||||||
appender(resultId);
|
appender(resultId);
|
||||||
appender(variable.storageClass);
|
appender(var.storageClass);
|
||||||
|
|
||||||
if (variable.initializer)
|
if (var.initializer)
|
||||||
appender(GetId((*variable.initializer)->constant));
|
appender(GetId((*var.initializer)->constant));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ namespace Nz
|
||||||
|
|
||||||
return std::visit(overloaded
|
return std::visit(overloaded
|
||||||
{
|
{
|
||||||
[&](const Pointer& pointer) -> UInt32
|
[this](const Pointer& pointer) -> UInt32
|
||||||
{
|
{
|
||||||
UInt32 resultId = m_writer.AllocateResultId();
|
UInt32 resultId = m_writer.AllocateResultId();
|
||||||
|
|
||||||
|
|
@ -30,11 +30,11 @@ namespace Nz
|
||||||
|
|
||||||
return resultId;
|
return resultId;
|
||||||
},
|
},
|
||||||
[&](const Value& value) -> UInt32
|
[](const Value& value) -> UInt32
|
||||||
{
|
{
|
||||||
return value.resultId;
|
return value.resultId;
|
||||||
},
|
},
|
||||||
[this](std::monostate) -> UInt32
|
[](std::monostate) -> UInt32
|
||||||
{
|
{
|
||||||
throw std::runtime_error("an internal error occurred");
|
throw std::runtime_error("an internal error occurred");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue