clean up some vulkan stuff for a lack of resolve targets

This commit is contained in:
Gregory Wells
2025-07-09 14:52:15 -04:00
parent 1e26afe6a5
commit 1022ad6cb5
3 changed files with 9 additions and 5 deletions

View File

@@ -44,6 +44,8 @@ VkAccessFlags vkGryphnRenderPassAccess(gnRenderPassAccess access) {
}
gnReturnCode createRenderPass(gnRenderPassDescriptor renderPass, gnDevice device, gnRenderPassDescriptorInfo info) {
renderPass->renderPassDescriptor = malloc(sizeof(gnPlatformRenderPassDescriptor));
renderPass->renderPassDescriptor->attachmentCount = info.attachmentCount;
@@ -79,9 +81,7 @@ gnReturnCode createRenderPass(gnRenderPassDescriptor renderPass, gnDevice device
.attachment = info.subpassInfos[i].colorAttachments[c].index,
.layout = vkGryphnImageLayout(info.subpassInfos[i].colorAttachments[c].imageLayout)
};
}
for (int c = 0; c < info.subpassInfos[i].colorAttachmentCount; c++) {
if (info.subpassInfos[i].resolveAttachments != NULL)
renderPass->renderPassDescriptor->resolveAttachments[i][c] = (VkAttachmentReference){
.attachment = info.subpassInfos[i].resolveAttachments[c].index,
.layout = vkGryphnImageLayout(info.subpassInfos[i].resolveAttachments[c].imageLayout)
@@ -93,9 +93,11 @@ gnReturnCode createRenderPass(gnRenderPassDescriptor renderPass, gnDevice device
.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS,
.colorAttachmentCount = info.subpassInfos[i].colorAttachmentCount,
.pColorAttachments = renderPass->renderPassDescriptor->colorAttachments[i],
.pResolveAttachments = renderPass->renderPassDescriptor->resolveAttachments[i]
};
if (info.subpassInfos[i].resolveAttachments != NULL)
renderPass->renderPassDescriptor->subpasses[i].pResolveAttachments = renderPass->renderPassDescriptor->resolveAttachments[i];
if (info.subpassInfos[i].depthAttachment != NULL) {
renderPass->renderPassDescriptor->depthAttachments[i] = (VkAttachmentReference){
.attachment = info.subpassInfos[i].depthAttachment->index,