remove all my stupid debug messages

This commit is contained in:
Gregory Wells
2025-06-24 16:04:02 -04:00
parent 17a9495a0a
commit cc31fd7d5c
5 changed files with 7 additions and 212 deletions

View File

@@ -2,7 +2,6 @@
#include "vulkan_swapchain_support.h"
#include <output_device/vulkan_physical_device.h>
#include "vulkan_surface/vulkan_surface.h"
#include "debugger/gryphn_debugger.h"
#include "textures/vulkan_texture.h"
#include "sync/semaphore/vulkan_semaphore.h"
#include "stdio.h"
@@ -11,50 +10,9 @@ gnReturnCode createPresentationQueue(gnPresentationQueueHandle presentationQueue
presentationQueue->presentationQueue = malloc(sizeof(struct gnPlatformPresentationQueue_t));
vkSwapchainSupportDetails details = vkGetSwapchainSupport(device->physicalDevice.physicalDevice->device, presentationInfo.surface->windowSurface->surface);
if (details.capabilities.currentExtent.width != presentationInfo.imageSize.x || details.capabilities.currentExtent.height != presentationInfo.imageSize.y) {
gnDebuggerSetErrorMessage(device->instance->debugger,
(gnMessageData){
.message = gnCreateString("Image size is unsupposed for presentation queue")
}
);
presentationInfo.imageSize = (gnUInt2){ details.capabilities.currentExtent.width, details.capabilities.currentExtent.height };
}
if (details.formatCount == 0) {
gnDebuggerSetErrorMessage(device->instance->debugger,
(gnMessageData){
.message = gnCreateString("Format count for presentation queue is zero")
}
);
return GN_NO_SUPPORTED_FORMATS;
}
if (details.presentModeCount == 0) {
gnDebuggerSetErrorMessage(device->instance->debugger,
(gnMessageData){
.message = gnCreateString("Present mode count for presentation queue is zero")
}
);
return GN_NO_SUPPORTED_PRESENT_MODES;
}
int index = -1;
VkFormat convertedFormat = vkGryphnFormatToVulkanFormat(presentationInfo.format.format);
VkColorSpaceKHR convertedColorSpace = vkGryphnColorSpaceToVulkanColorSpace(presentationInfo.format.colorSpace);
for (int i = 0; i < details.formatCount; i++) {
if (details.formats[i].format == convertedFormat && details.formats[i].colorSpace == convertedColorSpace) {
index = i;
break;
}
}
if (index == -1) {
gnDebuggerSetErrorMessage(device->instance->debugger, (gnMessageData){
.message = gnCreateString("Unsupported color format passed to Gryphn")
});
return GN_UNKNOWN_IMAGE_FORMAT;
}
VkPresentModeKHR presentMode = VK_PRESENT_MODE_FIFO_KHR;
VkExtent2D extent = {
.width = presentationInfo.imageSize.x,
@@ -66,8 +24,8 @@ gnReturnCode createPresentationQueue(gnPresentationQueueHandle presentationQueue
createInfo.surface = presentationInfo.surface->windowSurface->surface;
createInfo.minImageCount = presentationInfo.minImageCount;
createInfo.imageFormat = details.formats[index].format;
createInfo.imageColorSpace = details.formats[index].colorSpace;
createInfo.imageFormat = convertedFormat;
createInfo.imageColorSpace = convertedColorSpace;
createInfo.imageExtent = extent;
createInfo.imageArrayLayers = 1;
createInfo.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;