Merge pull request #1361 from billhollings/null-proc-addrs

Revert to strict publishing of functions only from enabled extensions.
This commit is contained in:
Bill Hollings 2021-05-13 22:49:43 -04:00 committed by GitHub
commit feb66390ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,16 +42,11 @@ typedef struct MVKEntryPoint {
bool isDevice;
bool isCore() { return !ext1Name && !ext2Name; }
// If we're artificially running without all supported extensions, allow the
// associated functions to be available anyway, in case the app is surprised
// (ie- expects the functions from past experience and has no alternate handling).
bool isEnabled(uint32_t enabledVersion, const MVKExtensionList& extList) {
return ((isCore() && MVK_VULKAN_API_VERSION_CONFORM(enabledVersion) >= apiVersion) ||
(extList.isEnabled(ext1Name) || extList.isEnabled(ext2Name) ||
!mvkIsAnyFlagEnabled(mvkConfig().advertiseExtensions,
MVK_CONFIG_ADVERTISE_EXTENSIONS_ALL)));
extList.isEnabled(ext1Name) || extList.isEnabled(ext2Name));
}
} MVKEntryPoint;