shader+graphics pipeline handles

This commit is contained in:
Greg Wells
2025-06-04 09:57:14 -04:00
parent f20d701353
commit 9faa96d5f5
8 changed files with 44 additions and 38 deletions

View File

@@ -51,10 +51,10 @@ gnReturnCode gnCreateGraphicsPipelineFn(struct gnGraphicsPipeline_t* graphicsPip
}
for (int i = 0; i < info.shaderModuleCount; i++) {
if (info.shaderModules[i].info.stage == GN_VERTEX_SHADER_MODULE) {
[descriptor setVertexFunction:info.shaderModules[i].shaderModule->function];
} else if (info.shaderModules[i].info.stage == GN_FRAGMENT_SHADER_MODULE) {
[descriptor setFragmentFunction:info.shaderModules[i].shaderModule->function];
if (info.shaderModules[i]->info.stage == GN_VERTEX_SHADER_MODULE) {
[descriptor setVertexFunction:info.shaderModules[i]->shaderModule->function];
} else if (info.shaderModules[i]->info.stage == GN_FRAGMENT_SHADER_MODULE) {
[descriptor setFragmentFunction:info.shaderModules[i]->shaderModule->function];
} else {
return GN_UNSUPPORTED_SHADER_MODULE;
}