Skip to content

Commit c124b2f

Browse files
committed
Fix compilation
1 parent 482a5a0 commit c124b2f

File tree

9 files changed

+15
-8
lines changed

9 files changed

+15
-8
lines changed

include/NZSL/Ast/AstSerializer.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <NZSL/Serializer.hpp>
1212
#include <NZSL/Ast/Module.hpp>
1313
#include <NZSL/Lang/SourceLocation.hpp>
14+
#include <unordered_map>
1415

1516
namespace nzsl::Ast
1617
{

include/NZSL/Ast/DependencyCheckerVisitor.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <NazaraUtils/Bitset.hpp>
1111
#include <NZSL/Config.hpp>
1212
#include <NZSL/Ast/RecursiveVisitor.hpp>
13+
#include <unordered_map>
1314

1415
namespace nzsl::Ast
1516
{

include/NZSL/Ast/SanitizeVisitor.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
#include <NZSL/Ast/Option.hpp>
1616
#include <NZSL/Ast/Types.hpp>
1717
#include <functional>
18+
#include <memory>
19+
#include <variant>
1820
#include <unordered_map>
19-
#include <unordered_set>
20-
#include <vector>
2121

2222
namespace nzsl::Ast
2323
{

include/NZSL/FilesystemModuleResolver.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ namespace nzsl
4747

4848
static bool CheckExtension(std::string_view filename);
4949

50+
std::recursive_mutex m_moduleLock;
5051
std::unordered_map<std::string, std::string> m_moduleByFilepath;
5152
std::unordered_map<std::string, Ast::ModulePtr> m_modules;
5253
Nz::MovablePtr<void> m_fileWatcher;
53-
std::recursive_mutex m_moduleLock;
5454
};
5555
}
5656

include/NZSL/SpirV/SpirvAstVisitor.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ namespace nzsl
141141

142142
std::size_t funcIndex;
143143
std::string name;
144+
std::unordered_map<std::size_t, std::size_t> varIndexToVarId;
144145
std::vector<FuncCall> funcCalls;
145146
std::vector<Parameter> parameters;
146147
std::vector<Variable> variables;
147-
std::unordered_map<std::size_t, std::size_t> varIndexToVarId;
148148
std::uint32_t funcId;
149149
std::uint32_t funcTypeId;
150150
std::uint32_t returnTypeId;

src/NZSL/Ast/SanitizeVisitor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#include <numeric>
2525
#include <sstream>
2626
#include <stdexcept>
27+
#include <unordered_set>
28+
#include <vector>
2729

2830
namespace nzsl::Ast
2931
{

src/NZSL/GlslWriter.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <optional>
2626
#include <sstream>
2727
#include <stdexcept>
28+
#include <unordered_map>
2829

2930
namespace nzsl
3031
{
@@ -294,12 +295,12 @@ namespace nzsl
294295

295296
FunctionData* currentFunction = nullptr;
296297

297-
tsl::ordered_set<GlslCapability> capabilities;
298-
tsl::ordered_set<Ast::ExpressionType> requiredPrecisionQualifiers;
299298
std::optional<ShaderStageType> selectedStage;
300299
std::string moduleSuffix;
301300
std::unordered_map<std::size_t, FunctionData> functions;
302301
std::unordered_map<std::size_t, Ast::StructDescription*> structs;
302+
tsl::ordered_set<GlslCapability> capabilities;
303+
tsl::ordered_set<Ast::ExpressionType> requiredPrecisionQualifiers;
303304
Nz::Bitset<> bufferStructs; //< structs used only in UBO/SSBO that shouldn't be declared as such in GLSL
304305
Nz::Bitset<> usedStructs; //< & with bufferStructs, to handle case where a UBO/SSBO struct is declared as a variable (which is allowed) or member of a struct
305306
Ast::DeclareFunctionStatement* entryPoint = nullptr;

src/NZSL/LangWriter.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <cassert>
1818
#include <optional>
1919
#include <stdexcept>
20+
#include <unordered_map>
2021

2122
namespace nzsl
2223
{
@@ -172,8 +173,6 @@ namespace nzsl
172173
std::string name;
173174
};
174175

175-
const States* states = nullptr;
176-
const Ast::Module* module;
177176
std::size_t currentModuleIndex;
178177
std::stringstream stream;
179178
std::unordered_map<std::size_t, Identifier> aliases;
@@ -182,6 +181,8 @@ namespace nzsl
182181
std::unordered_map<std::size_t, Identifier> structs;
183182
std::unordered_map<std::size_t, Identifier> variables;
184183
std::vector<std::string> moduleNames;
184+
const States* states = nullptr;
185+
const Ast::Module* module;
185186
bool isInEntryPoint = false;
186187
int streamEmptyLine = 1;
187188
unsigned int indentLevel = 0;

src/NZSL/SpirvWriter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <fstream>
2929
#include <stdexcept>
3030
#include <type_traits>
31+
#include <unordered_map>
3132
#include <vector>
3233

3334
namespace nzsl

0 commit comments

Comments
 (0)