mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 02:39:57 -04:00
Keep the runtime's shaders in the repository as source only, and compile them when the game is built.
The fifteen headers of SPIR-V words under runtime/ are no longer tracked. tools/build_shaders.py builds all of them: the GLSL with glslc, the SPIR-V assembly with spirv-as, and the two shaders assembled in Python from their scripts. build_game.py builds the missing and the stale ones before it compiles the runtime, and the build kit, the launcher release and the AppImage build them before they copy runtime/, so a player's PC still needs no shader compiler. git ignores the headers and check_content.py refuses a compiled shader in a commit. The headers built this way are byte for byte the ones removed here. vk_mvobj_fs.h is now mvobj_fs_spv.h, named like the others. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -70,7 +70,7 @@ from pathlib import Path
|
||||
|
||||
import check_isa
|
||||
import romfs_index
|
||||
from build_shaders import stale as stale_shaders
|
||||
import build_shaders
|
||||
from check_content import GENERATED_MARKER
|
||||
|
||||
WIN = os.name == 'nt'
|
||||
@@ -899,9 +899,7 @@ def main():
|
||||
copy_romfs_patches(args.version, out)
|
||||
global RUNTIME
|
||||
RUNTIME = (args.runtime or RUNTIME).resolve()
|
||||
stale = stale_shaders(RUNTIME)
|
||||
if stale:
|
||||
sys.exit(f'{stale[0]}: its SPIR-V header no longer matches; run python tools/build_shaders.py')
|
||||
build_shaders.build(RUNTIME) # the runtime's own shaders: the headers the sources below include, when missing or stale
|
||||
skip = {s for s in args.skip_runtime.split(',') if s}
|
||||
main_out = (ROOT / 'build' / args.version).resolve()
|
||||
pairs = None
|
||||
|
||||
Reference in New Issue
Block a user