metal graphics pipelines????

This commit is contained in:
Greg Wells
2025-05-28 22:26:39 -04:00
parent cf2da1e9ea
commit ccc4c9d4df
7 changed files with 82 additions and 9 deletions

View File

@@ -3,6 +3,7 @@
gnReturnCode gnCreateRenderPassDescriptor(struct gnRenderPassDescriptor_t* renderPass, struct gnOutputDevice_t* device, struct gnRenderPassDescriptorInfo_t info) {
renderPass->device = device;
renderPass->info = info;
return device->deviceFunctions->_gnCreateRenderPassDescriptor(renderPass, device, info);
}

View File

@@ -45,6 +45,7 @@ struct gnPlatformRenderPassDescriptor_t;
typedef struct gnRenderPassDescriptor_t {
struct gnPlatformRenderPassDescriptor_t* renderPassDescriptor;
struct gnRenderPassDescriptorInfo_t info;
struct gnOutputDevice_t* device;
} gnRenderPassDescriptor;

View File

@@ -3,6 +3,7 @@
gnReturnCode gnCreateShaderModule(struct gnShaderModule_t* module, struct gnOutputDevice_t* device, struct gnShaderModuleInfo_t shaderModuleInfo) {
module->device = device;
module->info = shaderModuleInfo;
return device->deviceFunctions->_gnCreateShaderModule(module, device, shaderModuleInfo);
}

View File

@@ -18,6 +18,7 @@ struct gnPlatformShaderModule_t;
typedef struct gnShaderModule_t {
struct gnPlatformShaderModule_t* shaderModule;
struct gnShaderModuleInfo_t info;
struct gnOutputDevice_t* device;
} gnShaderModule;

View File

@@ -22,15 +22,8 @@ typedef enum gnReturnCode_t {
GN_FAILED_TO_FIND_ENTRY_POINT,
GN_FAILED_TO_CREATE_UNIFORM_LAYOUT,
GN_FAILED_TO_CREATE_RENDER_PASS,
GN_FAILED_TO_CREATE_GRAPHICS_PIPELINE
// GN_UNKNOWN_FRAMEBUFFER_ATTACHMENT,
// GN_UNKNOWN_FUNCTION,
// GN_UNKNOWN_COLOR_FORMAT,
// GN_FAILED_CREATE_GRAPHICS_PIPELINE,
// GN_FAILED_TO_CREATE_FRAMEBUFFER,
// GN_FAILED_CREATE_RENDERPASS,
// GN_FAILED_TO_CREATE_IMAGE
GN_FAILED_TO_CREATE_GRAPHICS_PIPELINE,
GN_UNSUPPORTED_SHADER_MODULE
} gnReturnCode;
typedef gnReturnCode gnErrorCode;
@@ -58,5 +51,6 @@ static const char* gnErrorCodeToCString(enum gnReturnCode_t returnCode) {
case GN_FAILED_TO_CREATE_UNIFORM_LAYOUT: return "GN_FAILED_TO_CREATE_UNIFORM_LAYOUT";
case GN_FAILED_TO_CREATE_RENDER_PASS: return "GN_FAILED_TO_CREATE_RENDER_PASS";
case GN_FAILED_TO_CREATE_GRAPHICS_PIPELINE: return "GN_FAILED_TO_CREATE_GRAPHICS_PIPELINE";
case GN_UNSUPPORTED_SHADER_MODULE: return "GN_UNSUPPORTED_SHADER_MODULE";
}
}