Merge pull request #1421 from troughton/patch-3

MSL: Ensure OpStore source operands are marked for inclusion in function arguments
This commit is contained in:
Hans-Kristian Arntzen 2020-07-08 10:53:52 +02:00 committed by GitHub
commit 39ce5b46de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1278,6 +1278,11 @@ void CompilerMSL::extract_global_variables_from_function(uint32_t func_id, std::
uint32_t base_id = ops[0];
if (global_var_ids.find(base_id) != global_var_ids.end())
added_arg_ids.insert(base_id);
uint32_t rvalue_id = ops[1];
if (global_var_ids.find(rvalue_id) != global_var_ids.end())
added_arg_ids.insert(rvalue_id);
break;
}