compiler bug?
This commit is contained in:
@@ -7,9 +7,9 @@ StartupObject = "Vulkan.Example.Program"
|
|||||||
|
|
||||||
[Dependencies]
|
[Dependencies]
|
||||||
corlib = "*"
|
corlib = "*"
|
||||||
Vulkan = "*"
|
|
||||||
"Glfw.git" = {Git = "https://git.unicon-gmbh.de/BeefBindings/Glfw.git"}
|
"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]
|
[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"]
|
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"]
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
FileVersion = 1
|
FileVersion = 1
|
||||||
|
Unlocked = ["VulkanMemoryAllocator.git"]
|
||||||
|
|
||||||
[Workspace]
|
[Workspace]
|
||||||
StartupProject = "Vulkan.Example"
|
StartupProject = "Vulkan.Example"
|
||||||
|
|
||||||
[Projects]
|
[Projects]
|
||||||
"Vulkan.Example" = {Path = "."}
|
"Vulkan.Example" = {Path = "."}
|
||||||
Vulkan = {Path = "../BeefBindings_Vulkan"}
|
|
||||||
"Glfw.git" = {Git = "https://git.unicon-gmbh.de/BeefBindings/Glfw.git"}
|
"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"}
|
||||||
|
|||||||
@@ -414,13 +414,13 @@ class Program
|
|||||||
VkBufferCreateInfo* bufferCI = scope .(null, 0,
|
VkBufferCreateInfo* bufferCI = scope .(null, 0,
|
||||||
(.)size, .TransferSrc, .Exclusive
|
(.)size, .TransferSrc, .Exclusive
|
||||||
);
|
);
|
||||||
VkResult result = Vma.CreateBuffer(allocator, bufferCI, scope .()
|
VkResult result = allocator.CreateBuffer(bufferCI, scope .()
|
||||||
{
|
{
|
||||||
flags = .Mapped | .HostAccessSequentialWrite,
|
flags = .Mapped | .HostAccessSequentialWrite,
|
||||||
usage = .Auto,
|
usage = .Auto,
|
||||||
}, let transferBuffer, let transferBufferAlloc, let transferBufferAllocInfo);
|
}, let transferBuffer, let transferBufferAlloc, let transferBufferAllocInfo);
|
||||||
CheckResult(result);
|
CheckResult(result);
|
||||||
defer Vma.DestroyBuffer(allocator, transferBuffer, transferBufferAlloc);
|
defer allocator.DestroyBuffer(transferBuffer, transferBufferAlloc);
|
||||||
|
|
||||||
Internal.MemCpy(transferBufferAllocInfo.pMappedData, ptr, size);
|
Internal.MemCpy(transferBufferAllocInfo.pMappedData, ptr, size);
|
||||||
|
|
||||||
@@ -433,7 +433,7 @@ class Program
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
bufferCI.usage = usage | .TransferDst;
|
bufferCI.usage = usage | .TransferDst;
|
||||||
result = Vma.CreateBuffer(allocator, bufferCI, scope .()
|
result = allocator.CreateBuffer(bufferCI, scope .()
|
||||||
{
|
{
|
||||||
usage = .Auto,
|
usage = .Auto,
|
||||||
}, out buffer, out allocation, ?);
|
}, out buffer, out allocation, ?);
|
||||||
@@ -606,7 +606,7 @@ class Program
|
|||||||
}
|
}
|
||||||
EmitFill();
|
EmitFill();
|
||||||
|
|
||||||
result = Vma.CreateAllocator(scope .()
|
result = vmaCreateAllocator(scope .()
|
||||||
{
|
{
|
||||||
physicalDevice = physicalDevice.device,
|
physicalDevice = physicalDevice.device,
|
||||||
device = device,
|
device = device,
|
||||||
@@ -615,17 +615,17 @@ class Program
|
|||||||
instance = instance
|
instance = instance
|
||||||
}, out allocator);
|
}, out allocator);
|
||||||
CheckResult(result);
|
CheckResult(result);
|
||||||
defer:: Vma.DestroyAllocator(allocator);
|
defer:: allocator.Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
var vertices = vertices;
|
var vertices = vertices;
|
||||||
CreateAndPushBuffer(out vertexBuffer, let vertexBufferAllocation, .VertexBuffer, &vertices, sizeof(decltype(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;
|
var indices = indices;
|
||||||
CreateAndPushBuffer(out indexBuffer, let indexBufferAllocation, .IndexBuffer, &indices, sizeof(decltype(indices)));
|
CreateAndPushBuffer(out indexBuffer, let indexBufferAllocation, .IndexBuffer, &indices, sizeof(decltype(indices)));
|
||||||
defer:: Vma.DestroyBuffer(allocator, indexBuffer, indexBufferAllocation);
|
defer:: allocator.DestroyBuffer(indexBuffer, indexBufferAllocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user