Make type conversions implicit for dispatchable handles

Vulkan handles are not typesafe on 32-bit platforms, but only for
non-dispachable handles. Dispatchable handles are opaque struct pointers
on all platforms, and thus typesafe.

This commit makes all conversions for dispatchable handles implicit,
regardless of VULKAN_HPP_TYPESAFE_CONVERSION setting.
This commit is contained in:
phantom10111
2022-04-15 11:24:30 +02:00
parent 25256d1d59
commit 9e95c0072d
5 changed files with 44 additions and 44 deletions

View File

@@ -121,7 +121,7 @@ extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE h
static_assert( VK_HEADER_VERSION == 211, "Wrong VK_HEADER_VERSION!" );
// 32-bit vulkan is not typesafe for handles, so don't allow copy constructors on this platform by default.
// 32-bit vulkan is not typesafe for non-dispatchable handles, so don't allow copy constructors on this platform by default.
// To enable this feature on 32-bit platforms please define VULKAN_HPP_TYPESAFE_CONVERSION
#if ( VK_USE_64_BIT_PTR_DEFINES == 1 )
# if !defined( VULKAN_HPP_TYPESAFE_CONVERSION )