@@ -15,7 +15,7 @@ namespace {
15
15
}
16
16
return path.substr (i, std::string::npos);
17
17
}
18
-
18
+
19
19
std::string replace (std::string str, char c1, char c2) {
20
20
std::string ret = str;
21
21
for (unsigned i = 0 ; i < str.length (); ++i) {
@@ -40,7 +40,7 @@ namespace {
40
40
41
41
void MetalTranslator2::outputCode (const Target& target, const char * sourcefilename, const char * filename, char * output, std::map<std::string, int >& attributes) {
42
42
std::vector<unsigned > spirv;
43
-
43
+
44
44
spirv.push_back (magicNumber);
45
45
spirv.push_back (version);
46
46
spirv.push_back (generator);
@@ -56,7 +56,7 @@ void MetalTranslator2::outputCode(const Target& target, const char* sourcefilena
56
56
}
57
57
58
58
spirv_cross::CompilerMSL* compiler = new spirv_cross::CompilerMSL (spirv);
59
-
59
+
60
60
std::string name = extractFilename (sourcefilename);
61
61
name = name.substr (0 , name.find_last_of (" ." ));
62
62
name = replace (name, ' -' , ' _' );
@@ -86,8 +86,8 @@ void MetalTranslator2::outputCode(const Target& target, const char* sourcefilena
86
86
mslBinding.stage = convert (stage);
87
87
mslBinding.msl_buffer = stage == StageVertex ? 1 : 0 ;
88
88
p_res_bindings.push_back (mslBinding);
89
-
90
- std::string metal = compiler->compile (nullptr , &p_res_bindings);
89
+
90
+ std::string metal = compiler->compile (); // nullptr, & p_res_bindings); // TODO?
91
91
if (output) {
92
92
strcpy (output, metal.c_str ());
93
93
}
0 commit comments