vulkan 32/64 bit parity

This commit is contained in:
2026-06-22 19:07:18 +02:00
parent 49fcd8e56e
commit 6e1ff4625d
3 changed files with 14 additions and 5 deletions
+5 -1
View File
@@ -103,9 +103,10 @@ class SDL3Generator : Cpp2BeefGenerator, this(Span<char8*> args)
return;
}
case .TypedefDecl:
String prefix = scope .(64);
var spelling = GetCursorSpelling!(cursor);
if (spelling.StartsWith("Vk")) return;
String prefix = scope .(64);
if (spelling == "SDL_Keycode")
prefix.Set("SDLK_");
else
@@ -225,6 +226,9 @@ class SDL3Generator : Cpp2BeefGenerator, this(Span<char8*> args)
}
FixCurly();
return;
case .StructDecl:
var spelling = GetCursorSpelling!(cursor);
if (spelling.StartsWith("Vk")) return;
default:
}
base.HandleCursor(cursor);
+5
View File
@@ -11,6 +11,11 @@ static class SDL
typealias CrcUint32 = Uint32;
typealias CrcUint8 = Uint8;
public typealias VkInstance = int;
public typealias VkSurfaceKHR = uint64;
public typealias VkPhysicalDevice = int;
public struct VkAllocationCallbacks;
[OnCompile(.TypeDone)]
private static void Build()
{
+4 -4
View File
@@ -74,10 +74,10 @@ extension SDL
[CRepr] public struct VkInstance_T;public typealias VkInstance = VkInstance_T*;
[CRepr] public struct VkPhysicalDevice_T;public typealias VkPhysicalDevice = VkPhysicalDevice_T*;
[CRepr] public struct VkSurfaceKHR_T;public typealias VkSurfaceKHR = VkSurfaceKHR_T*;
[CRepr] public struct VkAllocationCallbacks;
/* Make sure to undef to avoid issues in case of later vulkan include */