diff options
author | ReinUsesLisp <[email protected]> | 2021-02-07 23:50:45 -0300 |
---|---|---|
committer | ReinUsesLisp <[email protected]> | 2021-02-07 23:52:40 -0300 |
commit | 1f7b70730d610cfbd5099ab93dd38ec8a78e7e35 (patch) | |
tree | e0611b7d3141131303475e10238cbdef1ed98b48 | |
parent | cae2725cc0abb9cea23ebbf72c990a86f802ab4b (diff) | |
download | sirit-1f7b70730d610cfbd5099ab93dd38ec8a78e7e35.tar.gz sirit-1f7b70730d610cfbd5099ab93dd38ec8a78e7e35.zip |
Fix global variables being added in code
-rw-r--r-- | src/sirit.cpp | 6 |
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() { |