File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -674,9 +674,21 @@ ifeq ($(OS),Windows_NT)
674674 @echo 'Vulkan Shaders Rebuilt for Windows...'
675675else
676676 @echo 'Now rebuilding vulkan shaders for Linux...'
677- ${shell} chmod +x vulkan-shaders-gen
678- ${shell} chmod +x glslc-linux
679- $(shell) ./vulkan-shaders-gen --glslc ./glslc-linux --input-dir ggml/src/ggml-vulkan/vulkan-shaders --target-hpp ggml/src/ggml-vulkan-shaders.hpp --target-cpp ggml/src/ggml-vulkan-shaders.cpp
677+ @chmod +x vulkan-shaders-gen glslc-linux
678+ @echo 'Checking if bundled glslc-linux binary is usable...'
679+ @GLSLC_BIN=$$(if ./glslc-linux --version >/dev/null 2>&1; then \
680+ echo "./glslc-linux"; \
681+ elif command -v glslc >/dev/null 2>&1; then \
682+ echo "glslc"; \
683+ else \
684+ echo ""; \
685+ fi); \
686+ if [ -z "$$GLSLC_BIN" ]; then \
687+ echo "Error: No usable glslc found. Vulkan shaders cannot be compiled!"; \
688+ else \
689+ echo "Using GLSLC: $$GLSLC_BIN"; \
690+ ./vulkan-shaders-gen --glslc "$$GLSLC_BIN" --input-dir ggml/src/ggml-vulkan/vulkan-shaders --target-hpp ggml/src/ggml-vulkan-shaders.hpp --target-cpp ggml/src/ggml-vulkan-shaders.cpp; \
691+ fi
680692 @echo 'Vulkan Shaders Rebuilt for Linux...'
681693endif
682694
You can’t perform that action at this time.
0 commit comments