Shader/SpirvPrinter: Add settings

This commit is contained in:
Jérôme Leclercq
2020-08-24 16:49:14 +02:00
parent 77b66620c9
commit ba777ebbca
2 changed files with 146 additions and 123 deletions

View File

@@ -16,16 +16,24 @@ namespace Nz
class NAZARA_SHADER_API SpirvPrinter
{
public:
struct Settings;
inline SpirvPrinter();
SpirvPrinter(const SpirvPrinter&) = default;
SpirvPrinter(SpirvPrinter&&) = default;
~SpirvPrinter() = default;
std::string Print(const UInt32* codepoints, std::size_t count);
std::string Print(const UInt32* codepoints, std::size_t count, const Settings& settings = Settings());
SpirvPrinter& operator=(const SpirvPrinter&) = default;
SpirvPrinter& operator=(SpirvPrinter&&) = default;
struct Settings
{
bool printHeader = true;
bool printParameters = true;
};
private:
void AppendInstruction();
std::string ReadString();