mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-11-13 10:57:15 +00:00
vulkan: check glslc executable string (#17144)
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
@@ -1080,6 +1081,11 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
if (args.find("--glslc") != args.end()) {
|
if (args.find("--glslc") != args.end()) {
|
||||||
GLSLC = args["--glslc"]; // Path to glslc
|
GLSLC = args["--glslc"]; // Path to glslc
|
||||||
|
|
||||||
|
if (!std::filesystem::exists(GLSLC) || !std::filesystem::is_regular_file(GLSLC)) {
|
||||||
|
std::cerr << "Error: glslc not found at " << GLSLC << std::endl;
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (args.find("--source") != args.end()) {
|
if (args.find("--source") != args.end()) {
|
||||||
input_filepath = args["--source"]; // The shader source file to compile
|
input_filepath = args["--source"]; // The shader source file to compile
|
||||||
|
|||||||
Reference in New Issue
Block a user