diff options
| author | Mark Young <marky@lunarg.com> | 2016-01-28 13:25:35 -0700 |
|---|---|---|
| committer | Mark Young <marky@lunarg.com> | 2016-01-28 13:25:35 -0700 |
| commit | 9a901cf92b363febe98f70969cc7f520c2e76101 (patch) | |
| tree | fccf0ec03af9cf1eb56020227c628dd9ea0ea3de | |
| parent | ba809883050937390fbe229555e7b3b2539da100 (diff) | |
| download | usermoji-9a901cf92b363febe98f70969cc7f520c2e76101.tar.xz | |
layers: Fix 32-bit Win compilation issue in swapchain layer.
The layer was using an unordered_map<void*, SwpSurface> ... in several
places, but VkSurfaceKHR (unlike many other Vulkan types) isn't a pointer
but a uint64_t. On Win32, it's trying to push in a uint64_t into a 32-bit
pointer, which the compiler is choking on. Instead, make the unordered_map
use VkSurfaceKHR.
| -rw-r--r-- | layers/swapchain.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/layers/swapchain.h b/layers/swapchain.h index 7d52a1d1..4dce9899 100644 --- a/layers/swapchain.h +++ b/layers/swapchain.h @@ -189,7 +189,7 @@ struct _SwpInstance { VkInstance instance; // Remember the VkSurfaceKHR's that are created for this VkInstance: - unordered_map<const void*, SwpSurface*> surfaces; + unordered_map<VkSurfaceKHR, SwpSurface*> surfaces; // When vkEnumeratePhysicalDevices is called, the VkPhysicalDevice's are // remembered: @@ -269,7 +269,7 @@ struct _SwpPhysicalDevice { // Record all surfaces that vkGetPhysicalDeviceSurfaceSupportKHR() was // called for: - unordered_map<const void*, SwpSurface*> supportedSurfaces; + unordered_map<VkSurfaceKHR, SwpSurface*> supportedSurfaces; // TODO: Record/use this info per-surface, not per-device, once a // non-dispatchable surface object is added to WSI: @@ -362,7 +362,7 @@ struct layer_data { // NOTE: The following are for keeping track of info that is used for // validating the WSI extensions. std::unordered_map<void *, SwpInstance> instanceMap; - std::unordered_map<void *, SwpSurface> surfaceMap; + std::unordered_map<VkSurfaceKHR, SwpSurface> surfaceMap; std::unordered_map<void *, SwpPhysicalDevice> physicalDeviceMap; std::unordered_map<void *, SwpDevice> deviceMap; std::unordered_map<VkSwapchainKHR, SwpSwapchain> swapchainMap; |
