Skip to content

Commit

Permalink
Fix some Vulkan error messages;
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornbytes committed Feb 9, 2025
1 parent 560be29 commit 719f0c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/gpu_vk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3028,13 +3028,13 @@ static gpu_memory* allocate(gpu_memory_type type, VkMemoryRequirements info, VkD
.memoryTypeIndex = allocator->memoryType
};

VK(vkAllocateMemory(state.device, &memoryInfo, NULL, &memory->handle), "Failed to allocate GPU memory") {
VK(vkAllocateMemory(state.device, &memoryInfo, NULL, &memory->handle), "vkAllocateMemory") {
allocator->block = NULL;
return NULL;
}

if (allocator->memoryFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) {
VK(vkMapMemory(state.device, memory->handle, 0, VK_WHOLE_SIZE, 0, &memory->pointer), "Failed to map memory") {
VK(vkMapMemory(state.device, memory->handle, 0, VK_WHOLE_SIZE, 0, &memory->pointer), "vkMapMemory") {
vkFreeMemory(state.device, memory->handle, NULL);
memory->handle = NULL;
return NULL;
Expand Down

0 comments on commit 719f0c0

Please sign in to comment.