some more stuff that idk why i did it
This commit is contained in:
@@ -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