finish redoing render pass creation on metal

This commit is contained in:
Gregory Wells
2025-07-23 15:42:34 -04:00
parent ac0813e7f2
commit bb19d855f5
5 changed files with 111 additions and 74 deletions

View File

@@ -2,8 +2,24 @@
#include "renderpass/gryphn_render_pass_descriptor.h"
#import <Metal/MTLRenderPass.h>
typedef MTLRenderPassDescriptor* mtlSubpass;
typedef struct mtlColorAttachmentCopyInfo {
uint32_t attachmentIndex;
int resolveAttachmentIndex; // -1 means no resolve attachment
} mtlColorAttachmentCopyInfo;
typedef struct mtlSubpassCopyInfo {
uint32_t colorAttachmentCount;
mtlColorAttachmentCopyInfo* colorAttachments;
} mtlSubpassCopyInfo;
typedef struct gnPlatformRenderPassDescriptor_t {
MTLRenderPassDescriptor* passDescriptor;
uint32_t subpassCount;
mtlSubpass* subpasses;
mtlSubpassCopyInfo* copyInfos;
} gnPlatformRenderPassDescriptor;
gnReturnCode createMetalRenderPass(gnRenderPassDescriptor renderPass, gnDevice device, gnRenderPassDescriptorInfo info);