diff --git a/projects/apis/vulkan/src/renderpass/vulkan_render_pass_descriptor.c b/projects/apis/vulkan/src/renderpass/vulkan_render_pass_descriptor.c index 9a2836d..ea0c482 100644 --- a/projects/apis/vulkan/src/renderpass/vulkan_render_pass_descriptor.c +++ b/projects/apis/vulkan/src/renderpass/vulkan_render_pass_descriptor.c @@ -72,7 +72,7 @@ gnReturnCode createRenderPass(gnRenderPassDescriptor renderPass, gnDevice device for (int i = 0; i < info.subpassCount; i++) { renderPass->renderPassDescriptor->colorAttachments[i] = malloc(sizeof(VkAttachmentReference) * info.subpassInfos[i].colorAttachmentCount); - renderPass->renderPassDescriptor->resolveAttachments[i] = malloc(sizeof(VkAttachmentReference) * info.subpassInfos[i].resolveAttachmentCount); + renderPass->renderPassDescriptor->resolveAttachments[i] = malloc(sizeof(VkAttachmentReference) * info.subpassInfos[i].colorAttachmentCount); for (int c = 0; c < info.subpassInfos[i].colorAttachmentCount; c++) { renderPass->renderPassDescriptor->colorAttachments[i][c] = (VkAttachmentReference){ @@ -81,7 +81,7 @@ gnReturnCode createRenderPass(gnRenderPassDescriptor renderPass, gnDevice device }; } - for (int c = 0; c < info.subpassInfos[i].resolveAttachmentCount; c++) { + for (int c = 0; c < info.subpassInfos[i].colorAttachmentCount; c++) { renderPass->renderPassDescriptor->resolveAttachments[i][c] = (VkAttachmentReference){ .attachment = info.subpassInfos[i].resolveAttachments[c].index, .layout = vkGryphnImageLayout(info.subpassInfos[i].resolveAttachments[c].imageLayout) diff --git a/projects/core/src/renderpass/gryphn_render_pass_descriptor.h b/projects/core/src/renderpass/gryphn_render_pass_descriptor.h index 7c4386e..da3180a 100644 --- a/projects/core/src/renderpass/gryphn_render_pass_descriptor.h +++ b/projects/core/src/renderpass/gryphn_render_pass_descriptor.h @@ -45,11 +45,9 @@ typedef struct gnSubpassAttachmentInfo_t { typedef struct gnSubpassInfo_t { uint32_t colorAttachmentCount; gnSubpassAttachmentInfo* colorAttachments; + gnSubpassAttachmentInfo* resolveAttachments; gnSubpassAttachmentInfo* depthAttachment; - - uint32_t resolveAttachmentCount; - gnSubpassAttachmentInfo* resolveAttachments; } gnSubpassInfo; #define GN_SUBPASS_EXTERNAL -1