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:
parent
4fcd64c017
commit
7fd270edb6
@ -87,7 +87,7 @@ void MVKPhysicalDevice::getProperties(VkPhysicalDeviceProperties2KHR* properties
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
next = *(VkStructureType**)(next+1);
|
next = (VkStructureType*)((VkPhysicalDeviceProperties2KHR*)next)->pNext;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user