From 06cf213feb654158f3d955ae4e5bb43bde720bd0 Mon Sep 17 00:00:00 2001 From: Warwick Date: Thu, 13 Feb 2025 16:24:45 +0000 Subject: [PATCH] Made messages slightly easier to read --- src/vulkan_wrapper.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vulkan_wrapper.c b/src/vulkan_wrapper.c index d80996d..00d4d7f 100644 --- a/src/vulkan_wrapper.c +++ b/src/vulkan_wrapper.c @@ -30,7 +30,7 @@ debugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, void *pUserData) { // TODO: Put all messages into a log file if (messageSeverity >= VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT) { - fprintf(stderr, "validation layer: %s\n", pCallbackData->pMessage); + fprintf(stderr, "validation layer: %s\n\n", pCallbackData->pMessage); } return VK_FALSE; @@ -734,9 +734,9 @@ void createGraphicsPipeline(VulkanApp *app) { VkVertexInputBindingDescription bindingDescription = getBindingDescription(); #define attributeDescriptionsCount 2 + // TODO: Probably better to move to dynamic array VkVertexInputAttributeDescription - attributeDescriptions[attributeDescriptionsCount] = { - 0}; // TODO: Probably better to move to dynamic array + attributeDescriptions[attributeDescriptionsCount] = {0}; populateAttributeDescriptions( (VkVertexInputAttributeDescription *)&attributeDescriptions); @@ -1090,6 +1090,7 @@ void createVertexBuffer(VulkanApp *app) { bufferInfo.size = sizeof(vertices[0]) * vertexCount; bufferInfo.usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT; bufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE; + if (vkCreateBuffer(app->device, &bufferInfo, NULL, &app->vertexBuffer) != VK_SUCCESS) { fprintf(stderr, "Failed to create vertex buffer!\n");