some more stuff that idk why i did it
This commit is contained in:
@@ -89,7 +89,7 @@ gnReturnCode createMetalGraphicsPipeline(gnGraphicsPipeline graphicsPipeline, gn
|
||||
}
|
||||
|
||||
|
||||
const char* name = info.shaderModules[i]->info.entryPoint.value;
|
||||
const char* name = gnToCString(info.shaderModules[i]->info.entryPoint);
|
||||
if (strcmp(name, "main") == 0) name = "main0";
|
||||
|
||||
gnBool foundFunction = false;
|
||||
|
@@ -18,6 +18,8 @@ void handle_resources(spirv_cross::CompilerMSL& compiler, spirv_cross::SmallVect
|
||||
|
||||
GN_CPP_FUNCTION mtlCompiler mtlCreateCompiler(mtlCompilerInfo* info) {
|
||||
mtlInternalCompiler* compiler = (mtlInternalCompiler*)malloc(sizeof(mtlInternalCompiler));
|
||||
// if(info->stage == mtlVertex) compiler->mslCompiler->set_entry_point(info->entryPoint, spv::ExecutionModelVertex);
|
||||
// if(info->stage == mtlFragment) compiler->mslCompiler->set_entry_point(info->entryPoint, spv::ExecutionModelFragment);
|
||||
compiler->mslCompiler = new spirv_cross::CompilerMSL(info->code, info->wordCount);
|
||||
|
||||
spirv_cross::CompilerMSL::Options options = compiler->mslCompiler->get_msl_options();
|
||||
|
@@ -12,7 +12,7 @@ gnReturnCode createMetalShaderModule(gnShaderModule module, gnDevice device, gnS
|
||||
mtlCompilerInfo info = {
|
||||
.code = shaderModuleInfo.code,
|
||||
.wordCount = shaderModuleInfo.size / 4,
|
||||
.entryPoint = shaderModuleInfo.entryPoint.value,
|
||||
.entryPoint = gnToCString(shaderModuleInfo.entryPoint),
|
||||
.stage = (shaderModuleInfo.stage == GN_FRAGMENT_SHADER_MODULE) ? mtlFragment : mtlVertex
|
||||
};
|
||||
if ((device->outputDevice->device.argumentBuffersSupport == MTLArgumentBuffersTier2)) {
|
||||
|
Reference in New Issue
Block a user