Big SpirVWriter refactor
This commit is contained in:
42
include/Nazara/Shader/SpirvPrinter.hpp
Normal file
42
include/Nazara/Shader/SpirvPrinter.hpp
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright (C) 2020 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Shader generator"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_SPIRVPRINTER_HPP
|
||||
#define NAZARA_SPIRVPRINTER_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Shader/Config.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
class NAZARA_SHADER_API SpirvPrinter
|
||||
{
|
||||
public:
|
||||
inline SpirvPrinter();
|
||||
SpirvPrinter(const SpirvPrinter&) = default;
|
||||
SpirvPrinter(SpirvPrinter&&) = default;
|
||||
~SpirvPrinter() = default;
|
||||
|
||||
std::string Print(const UInt32* codepoints, std::size_t count);
|
||||
|
||||
SpirvPrinter& operator=(const SpirvPrinter&) = default;
|
||||
SpirvPrinter& operator=(SpirvPrinter&&) = default;
|
||||
|
||||
private:
|
||||
void AppendInstruction();
|
||||
std::string ReadString();
|
||||
UInt32 ReadWord();
|
||||
|
||||
struct State;
|
||||
|
||||
State* m_currentState;
|
||||
};
|
||||
}
|
||||
|
||||
#include <Nazara/Shader/SpirvPrinter.inl>
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user