Merge pull request #1072 from cdavis5e/subgroup-size-vendor

MVKPhysicalDevice: Get the vendor ID before setting the subgroup size.
This commit is contained in:
Bill Hollings 2020-09-25 10:52:21 -04:00 committed by GitHub
commit 655b15a609
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1243,6 +1243,7 @@ void MVKPhysicalDevice::initMetalFeatures() {
#if MVK_MACOS
if (mvkOSVersionIsAtLeast(10.14)) {
static const uint32_t kAMDVendorId = 0x1002;
initGPUInfoProperties(); // Need to know the vendor ID for this.
_metalFeatures.subgroupSize = (_properties.vendorID == kAMDVendorId) ? 64 : 32;
}
#endif