finish vulkans support of return codes

This commit is contained in:
Gregory Wells
2025-07-29 11:57:05 -04:00
parent a628dc7a23
commit b5984d22f4
14 changed files with 74 additions and 113 deletions

View File

@@ -2,7 +2,7 @@
#include "vulkan_surface/vulkan_surface.h"
#include "output_device/vulkan_output_devices.h"
#include <output_device/vulkan_physical_device.h>
#include "stdio.h"
#include <vulkan_result_converter.h>
VkAttachmentLoadOp vkGryphnLoadOperation(gnLoadOperation loadOperation) {
switch(loadOperation) {
@@ -130,18 +130,11 @@ gnReturnCode createRenderPass(gnRenderPassDescriptor renderPass, gnDevice device
.dependencyCount = info.dependencyCount,
.pDependencies = renderPass->renderPassDescriptor->dependencies,
};
if (vkCreateRenderPass(device->outputDevice->device, &renderPassInfo, NULL, &renderPass->renderPassDescriptor->renderPass) != VK_SUCCESS)
return GN_FAILED_TO_CREATE_RENDER_PASS;
return GN_SUCCESS;
return VkResultToGnReturnCode(vkCreateRenderPass(device->outputDevice->device, &renderPassInfo, NULL, &renderPass->renderPassDescriptor->renderPass));
}
void destroyRenderPass(gnRenderPassDescriptor renderPass) {
vkDestroyRenderPass(renderPass->device->outputDevice->device, renderPass->renderPassDescriptor->renderPass, NULL);
free(renderPass->renderPassDescriptor->attachments);
free(renderPass->renderPassDescriptor->subpasses);
free(renderPass->renderPassDescriptor->dependencies);