MVKDevice: Fix a segfault walking unknown extension structs.

The problem is that on 64-bit platforms (i.e. every platform we support)
there will be padding between the `sType` and `pNext` members of any
extensible Vulkan structure, because `sType` is only 4 bytes while
`pNext` is 8 (and needs 8-byte alignment).

Should fix a segfault running `vulkaninfo`.
This commit is contained in:
Chip Davis 2018-09-05 11:11:40 -05:00
parent 4fcd64c017
commit 7fd270edb6

View File

@ -87,7 +87,7 @@ void MVKPhysicalDevice::getProperties(VkPhysicalDeviceProperties2KHR* properties
break;
}
default:
next = *(VkStructureType**)(next+1);
next = (VkStructureType*)((VkPhysicalDeviceProperties2KHR*)next)->pNext;
break;
}
}