Made messages slightly easier to read

This commit is contained in:
Warwick 2025-02-13 16:24:45 +00:00
parent 3d241b8718
commit 06cf213feb

View file

@ -30,7 +30,7 @@ debugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
void *pUserData) { void *pUserData) {
// TODO: Put all messages into a log file // TODO: Put all messages into a log file
if (messageSeverity >= VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT) { 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; return VK_FALSE;
@ -734,9 +734,9 @@ void createGraphicsPipeline(VulkanApp *app) {
VkVertexInputBindingDescription bindingDescription = getBindingDescription(); VkVertexInputBindingDescription bindingDescription = getBindingDescription();
#define attributeDescriptionsCount 2 #define attributeDescriptionsCount 2
// TODO: Probably better to move to dynamic array
VkVertexInputAttributeDescription VkVertexInputAttributeDescription
attributeDescriptions[attributeDescriptionsCount] = { attributeDescriptions[attributeDescriptionsCount] = {0};
0}; // TODO: Probably better to move to dynamic array
populateAttributeDescriptions( populateAttributeDescriptions(
(VkVertexInputAttributeDescription *)&attributeDescriptions); (VkVertexInputAttributeDescription *)&attributeDescriptions);
@ -1090,6 +1090,7 @@ void createVertexBuffer(VulkanApp *app) {
bufferInfo.size = sizeof(vertices[0]) * vertexCount; bufferInfo.size = sizeof(vertices[0]) * vertexCount;
bufferInfo.usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT; bufferInfo.usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT;
bufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE; bufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
if (vkCreateBuffer(app->device, &bufferInfo, NULL, &app->vertexBuffer) != if (vkCreateBuffer(app->device, &bufferInfo, NULL, &app->vertexBuffer) !=
VK_SUCCESS) { VK_SUCCESS) {
fprintf(stderr, "Failed to create vertex buffer!\n"); fprintf(stderr, "Failed to create vertex buffer!\n");