1
0
Fork 0
mirror of https://git.suyu.dev/suyu/sirit.git synced 2024-12-22 04:02:03 +00:00

Fix global variables being added in code

This commit is contained in:
ReinUsesLisp 2021-02-07 23:50:45 -03:00
parent cae2725cc0
commit 1f7b70730d

View file

@ -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() {