compiler bug?

This commit is contained in:
2026-06-08 17:42:10 +02:00
parent 0d469e0538
commit 5b2b079447
3 changed files with 12 additions and 11 deletions

View File

@@ -7,9 +7,9 @@ StartupObject = "Vulkan.Example.Program"
[Dependencies]
corlib = "*"
Vulkan = "*"
"Glfw.git" = {Git = "https://git.unicon-gmbh.de/BeefBindings/Glfw.git"}
VulkanMemoryAllocator = "*"
"VulkanMemoryAllocator.git" = {Git = "https://git.unicon-gmbh.de/BeefBindings/VulkanMemoryAllocator.git"}
"Vulkan-Beef.git" = {Git = "https://git.unicon-gmbh.de/Rune/Vulkan-Beef.git"}
[Configs.Debug.Win64]
PreBuildCmds = ["glslangvalidator -V $(ProjectDir)/src/shader.vert.glsl -o $(ProjectDir)/src/shader.vert.spv", "glslangvalidator -V $(ProjectDir)/src/shader.frag.glsl -o $(ProjectDir)/src/shader.frag.spv"]

View File

@@ -1,10 +1,11 @@
FileVersion = 1
Unlocked = ["VulkanMemoryAllocator.git"]
[Workspace]
StartupProject = "Vulkan.Example"
[Projects]
"Vulkan.Example" = {Path = "."}
Vulkan = {Path = "../BeefBindings_Vulkan"}
"Glfw.git" = {Git = "https://git.unicon-gmbh.de/BeefBindings/Glfw.git"}
VulkanMemoryAllocator = {Path = "../../RandomStuff/Cpp2Beef/Bindings/VulkanMemoryAllocator"}
"VulkanMemoryAllocator.git" = {Git = "https://git.unicon-gmbh.de/BeefBindings/VulkanMemoryAllocator.git"}
"Vulkan-Beef.git" = {Git = "https://git.unicon-gmbh.de/Rune/Vulkan-Beef.git"}

View File

@@ -414,13 +414,13 @@ class Program
VkBufferCreateInfo* bufferCI = scope .(null, 0,
(.)size, .TransferSrc, .Exclusive
);
VkResult result = Vma.CreateBuffer(allocator, bufferCI, scope .()
VkResult result = allocator.CreateBuffer(bufferCI, scope .()
{
flags = .Mapped | .HostAccessSequentialWrite,
usage = .Auto,
}, let transferBuffer, let transferBufferAlloc, let transferBufferAllocInfo);
CheckResult(result);
defer Vma.DestroyBuffer(allocator, transferBuffer, transferBufferAlloc);
defer allocator.DestroyBuffer(transferBuffer, transferBufferAlloc);
Internal.MemCpy(transferBufferAllocInfo.pMappedData, ptr, size);
@@ -433,7 +433,7 @@ class Program
);
}
bufferCI.usage = usage | .TransferDst;
result = Vma.CreateBuffer(allocator, bufferCI, scope .()
result = allocator.CreateBuffer(bufferCI, scope .()
{
usage = .Auto,
}, out buffer, out allocation, ?);
@@ -606,7 +606,7 @@ class Program
}
EmitFill();
result = Vma.CreateAllocator(scope .()
result = vmaCreateAllocator(scope .()
{
physicalDevice = physicalDevice.device,
device = device,
@@ -615,17 +615,17 @@ class Program
instance = instance
}, out allocator);
CheckResult(result);
defer:: Vma.DestroyAllocator(allocator);
defer:: allocator.Destroy();
}
{
var vertices = vertices;
CreateAndPushBuffer(out vertexBuffer, let vertexBufferAllocation, .VertexBuffer, &vertices, sizeof(decltype(vertices)));
defer:: Vma.DestroyBuffer(allocator, vertexBuffer, vertexBufferAllocation);
defer:: allocator.DestroyBuffer(vertexBuffer, vertexBufferAllocation);
var indices = indices;
CreateAndPushBuffer(out indexBuffer, let indexBufferAllocation, .IndexBuffer, &indices, sizeof(decltype(indices)));
defer:: Vma.DestroyBuffer(allocator, indexBuffer, indexBufferAllocation);
defer:: allocator.DestroyBuffer(indexBuffer, indexBufferAllocation);
}
{