Merge pull request #830 from cdavis5e/forced-signedness-var-ptr

MSL: Fix some types I missed when implementing variable pointers.
This commit is contained in:
Hans-Kristian Arntzen 2019-01-17 11:54:39 +01:00 committed by GitHub
commit 91519aaf00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1479,6 +1479,7 @@ uint32_t CompilerMSL::ensure_correct_attribute_type(uint32_t type_id, uint32_t l
auto &base_type = set<SPIRType>(base_type_id);
base_type = type;
base_type.basetype = type.basetype == SPIRType::Short ? SPIRType::UShort : SPIRType::UInt;
base_type.pointer = false;
if (!type.pointer)
return base_type_id;
@ -1508,6 +1509,7 @@ uint32_t CompilerMSL::ensure_correct_attribute_type(uint32_t type_id, uint32_t l
auto &base_type = set<SPIRType>(base_type_id);
base_type = type;
base_type.basetype = SPIRType::UInt;
base_type.pointer = false;
if (!type.pointer)
return base_type_id;