MSL: Ensure OpStore source operands are marked for inclusion in function arguments

Without this change, code such as:

```
OpStore %param_var_mipLevelSizes_0 %heightmapMipSizes
```

within a function that then forwards the value `%param_var_mipLevelSizes_0` to another function will not have `%heightmapMipSizes` registered as an argument to the function.
This commit is contained in:
Thomas Roughton 2020-07-07 17:10:36 +12:00 committed by GitHub
parent 559b21c6c9
commit b74a84e4cb
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;
}