Skip to content

Vulkan: Fix build on 32-bit Windows (and likely other non-64-bit LLP platforms)

Chun-wei Fan requested to merge vulkan-windows-32 into main

Hi,

From part of the commit comments:

The Vulkan objects that we use in the GSK Vulkan code may or may not be pointer types depending on whether the target platform is an 64-bit LLP platform, where building the code in its current state can lead to warnings and errors for type mismatch.

This leads to compiler warnings/error C4024/C4047 on Visual Studio that indicate type mismatches as the relevent Vulkan objects are defined as uint64_t rather than pointers on 32-bit Windows, and we are treating these Vulkan objects like pointers as we hash (and retrieve them from hashes or refer to them).

So, define macros to treat these Vulkan objects like pointers, not unlike GSIZE_TO_POINTER/POINTER_TO_GSIZE, where needed, so that we can safely use them as the way we do.

With blessings, thank you!

Merge request reports