mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-17 04:19:40 +00:00
attempt to fall back to system glslc
This commit is contained in:
parent
5edbacdd0e
commit
6e42e673c6
1 changed files with 15 additions and 3 deletions
18
Makefile
18
Makefile
|
@ -674,9 +674,21 @@ ifeq ($(OS),Windows_NT)
|
||||||
@echo 'Vulkan Shaders Rebuilt for Windows...'
|
@echo 'Vulkan Shaders Rebuilt for Windows...'
|
||||||
else
|
else
|
||||||
@echo 'Now rebuilding vulkan shaders for Linux...'
|
@echo 'Now rebuilding vulkan shaders for Linux...'
|
||||||
${shell} chmod +x vulkan-shaders-gen
|
@chmod +x vulkan-shaders-gen glslc-linux
|
||||||
${shell} chmod +x glslc-linux
|
@echo 'Checking if bundled glslc-linux binary is usable...'
|
||||||
$(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
|
@GLSLC_BIN=$$(if ./glslc-linux --version >/dev/null 2>&1; then \
|
||||||
|
echo "./glslc-linux"; \
|
||||||
|
elif command -v glslc >/dev/null 2>&1; then \
|
||||||
|
echo "glslc"; \
|
||||||
|
else \
|
||||||
|
echo ""; \
|
||||||
|
fi); \
|
||||||
|
if [ -z "$$GLSLC_BIN" ]; then \
|
||||||
|
echo "Error: No usable glslc found. Vulkan shaders cannot be compiled!"; \
|
||||||
|
else \
|
||||||
|
echo "Using GLSLC: $$GLSLC_BIN"; \
|
||||||
|
./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; \
|
||||||
|
fi
|
||||||
@echo 'Vulkan Shaders Rebuilt for Linux...'
|
@echo 'Vulkan Shaders Rebuilt for Linux...'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue