From 1f7b70730d610cfbd5099ab93dd38ec8a78e7e35 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Sun, 7 Feb 2021 23:50:45 -0300 Subject: [PATCH] Fix global variables being added in code --- src/sirit.cpp | 6 +++--- 1 file 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 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() {