Skip to content

Commit d93f725

Browse files
committedJul 18, 2024
fix miss-matched parenthesis
1 parent 4f17468 commit d93f725

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎ggml/src/vulkan-shaders/vulkan-shaders-gen.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,11 @@ void string_to_spv(const std::string& _name, const std::string& in_fname, const
193193
std::string out_fname = join_paths(output_dir, name + ".spv");
194194
std::string in_path = join_paths(input_dir, in_fname);
195195

196-
std::vector<std::string> cmd = {GLSLC, "-fshader-stage=compute", "--target-env=vulkan1.2", "-O", "\"" + in_path + "\"", "-o", "\"" + out_fname + "\""};
196+
#ifdef _WIN32
197+
std::vector<std::string> cmd = {GLSLC, "-fshader-stage=compute", "--target-env=vulkan1.2", "-O", "\"" + in_path + "\"", "-o", "\"" + out_fname + "\""};
198+
#else
199+
std::vector<std::string> cmd = {GLSLC, "-fshader-stage=compute", "--target-env=vulkan1.2", "-O", in_path, "-o", out_fname};
200+
#endif
197201
for (const auto& define : defines) {
198202
cmd.push_back("-D" + define.first + "=" + define.second);
199203
}
@@ -451,7 +455,7 @@ void write_output_files() {
451455
size_t read_size = fread(data.data(), 1, size, spv);
452456
fclose(spv);
453457
if (read_size != size) {
454-
std::cerr << "Error reading SPIR-V file: " << path << " (" << strerror(errno) << "\n";
458+
std::cerr << "Error reading SPIR-V file: " << path << " (" << strerror(errno) << ")\n";
455459
continue;
456460
}
457461

0 commit comments

Comments
 (0)