aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorReinUsesLisp <[email protected]>2021-02-07 23:50:45 -0300
committerReinUsesLisp <[email protected]>2021-02-07 23:52:40 -0300
commit1f7b70730d610cfbd5099ab93dd38ec8a78e7e35 (patch)
treee0611b7d3141131303475e10238cbdef1ed98b48
parentcae2725cc0abb9cea23ebbf72c990a86f802ab4b (diff)
downloadsirit-1f7b70730d610cfbd5099ab93dd38ec8a78e7e35.tar.gz
sirit-1f7b70730d610cfbd5099ab93dd38ec8a78e7e35.zip
Fix global variables being added in code
-rw-r--r--src/sirit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sirit.cpp b/src/sirit.cpp
index 7370bdf..1aa0e66 100644
--- a/src/sirit.cpp
+++ b/src/sirit.cpp
@@ -111,9 +111,9 @@ Id Module::AddLocalVariable(Id result_type, spv::StorageClass storage_class,
Id Module::AddGlobalVariable(Id result_type, spv::StorageClass storage_class,
std::optional<Id> initializer) {
- code->Reserve(5);
- return *code << OpId{spv::Op::OpVariable, result_type} << storage_class << initializer
- << EndOp{};
+ global_variables->Reserve(5);
+ return *global_variables << OpId{spv::Op::OpVariable, result_type} << storage_class
+ << initializer << EndOp{};
}
Id Module::GetGLSLstd450() {