Skip to content

Commit

Permalink
For specifically AMD drivers that have a version in their JSON, assum…
Browse files Browse the repository at this point in the history
…e they are 1.0 unless the JSON says 1.1
  • Loading branch information
hg-ctangora committed Aug 18, 2019
1 parent 74a45b5 commit 3e917fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion loader/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -5813,8 +5813,10 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateInstance(const VkInstanceCreateI
// Get the driver version from vkEnumerateInstanceVersion
uint32_t icd_version = VK_API_VERSION_1_0;
VkResult icd_result = VK_SUCCESS;
bool is_amd = (strstr(icd_term->scanned_icd->lib_name, "amdvlk") != NULL);

if (icd_term->scanned_icd->api_version > 0) {
if (icd_term->scanned_icd->api_version > 0 &&
(!is_amd || icd_term->scanned_icd->api_version >= VK_API_VERSION_1_1)) {
PFN_vkEnumerateInstanceVersion icd_enumerate_instance_version =
(PFN_vkEnumerateInstanceVersion)icd_term->scanned_icd->GetInstanceProcAddr(NULL, "vkEnumerateInstanceVersion");
if (icd_enumerate_instance_version != NULL) {
Expand Down

0 comments on commit 3e917fe

Please sign in to comment.