mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-08 02:58:37 +01:00
feat(vulkan): vulkan 1.4 core with the user interface and the launcher, shaders split into ogl46/vk14 with SPIR-V binaries loaded first
This commit is contained in:
@@ -1,16 +1,20 @@
|
||||
#!/bin/sh
|
||||
# Offline GLSL validator for shaders/ (the same preprocessing as gl::shader in the game, then glslangValidator).
|
||||
# Offline validator of the shaders (shaders/ogl46 and shaders/vk14): the same preprocessing as the game
|
||||
# (rendering/common/shadersource.cpp), then glslangValidator.
|
||||
#
|
||||
# Requirements: g++ with C++20, glslangValidator in PATH (Debian/Ubuntu: apt install glslang-tools),
|
||||
# submodule ref/glm (git submodule update --init ref/glm).
|
||||
# Usage (Linux; build.sh works from any directory, validateshaders reads ../shaders/ so it runs from here):
|
||||
# ci_shadervalidator/build.sh
|
||||
# cd ci_shadervalidator && ./validateshaders
|
||||
# Every .vert/.frag/.geom/.comp under shaders/ is checked twice (features on and off).
|
||||
# Every .vert/.frag/.geom/.comp of shaders/ogl46 is compiled as the game compiles the source (features on and off, and the
|
||||
# variant of the multi draws) and to SPIR-V for opengl from the file as it is (as glslc makes the binaries of
|
||||
# shaders/ogl46bin); the constants written in shaders/ogl46/common.glsl are compared with those of the game. The shaders of
|
||||
# shaders/vk14 are compiled to SPIR-V for vulkan.
|
||||
# Exit code is 0 when all shaders pass, 1 otherwise; failing shaders are listed at the end.
|
||||
#
|
||||
# The validator's own stdafx.h and utilities/{Globals,Logs}.h stand in for the game's headers,
|
||||
# so the repository root must not be on the include path.
|
||||
# The validator's own stdafx.h and utilities/{Globals,Logs}.h stand in for the game's headers: its directory comes first
|
||||
# on the include path, before the repository root.
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
g++ -std=c++20 -O1 -DSHADERVALIDATOR_STANDALONE ../ref/glad/src/glad.c ../gl/glsl_common.cpp ../gl/shader.cpp main.cpp -I. -I../ref/glad/include -I../ref/glm -o validateshaders
|
||||
g++ -std=c++20 -O1 ../ref/glad/src/glad.c ../gl/glsl_common.cpp ../rendering/common/shadersource.cpp main.cpp -I. -I.. -I../ref/glad/include -I../ref/glm -o validateshaders
|
||||
|
||||
Reference in New Issue
Block a user