mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-24 18:45:38 -10:00
rslc is the slang compiler everywhere. ./configure --enable-glslang --enable-spirv_cross links the system's glslang and SPIRV-Cross next to it when both are found, and only then does Settings > Drivers offer a Shader Compiler choice between the two: one setting read per stage picks the path, with nothing copied. The MSVC 2010 project builds Vulkan and rslc. Samples that used the vendored copies run on rslc or the system's SPIRV-Cross.
43 lines
1.6 KiB
Makefile
43 lines
1.6 KiB
Makefile
# The SPIR-V cache: gfx/drivers_shader/slang_cache.c and the cache store
|
|
# in gfx/video_shader_parse.c, against a real directory through the
|
|
# real VFS. video_shader_parse.c is linked whole and only its cache
|
|
# store is called, so the frontend the rest of it names is left
|
|
# unresolved (GNU ld, non-PIE).
|
|
RA := ../../..
|
|
SAN ?= address,undefined
|
|
CFLAGS := -std=gnu99 -g1 -O1 -fsanitize=$(SAN) -DRARCH_INTERNAL \
|
|
-DHAVE_SLANG -DHAVE_RSLC \
|
|
-I$(RA) -I$(RA)/libretro-common/include -I$(RA)/deps
|
|
SRC := slang_cache_test.c \
|
|
$(RA)/gfx/drivers_shader/slang_cache.c \
|
|
$(RA)/gfx/drivers_shader/slang_blob.c \
|
|
$(RA)/gfx/video_shader_parse.c \
|
|
$(RA)/libretro-common/streams/file_stream.c \
|
|
$(RA)/libretro-common/vfs/vfs_implementation.c \
|
|
$(RA)/libretro-common/file/file_path.c \
|
|
$(RA)/libretro-common/file/file_path_io.c \
|
|
$(RA)/libretro-common/compat/compat_strl.c \
|
|
$(RA)/libretro-common/compat/fopen_utf8.c \
|
|
$(RA)/libretro-common/string/stdstring.c \
|
|
$(RA)/libretro-common/encodings/encoding_crc32.c \
|
|
$(RA)/libretro-common/encodings/encoding_utf.c \
|
|
$(RA)/libretro-common/time/rtime.c
|
|
LDFLAGS := -no-pie -Wl,--unresolved-symbols=ignore-all -lm
|
|
|
|
all: mapped read
|
|
|
|
mapped: $(SRC)
|
|
$(CC) $(CFLAGS) -DHAVE_MMAP -no-pie -o $@ $(SRC) $(LDFLAGS)
|
|
|
|
read: $(SRC)
|
|
$(CC) $(CFLAGS) -no-pie -o $@ $(SRC) $(LDFLAGS)
|
|
|
|
check: all
|
|
ASAN_OPTIONS=detect_leaks=1 ./mapped
|
|
ASAN_OPTIONS=detect_leaks=1 ./read
|
|
|
|
clean:
|
|
rm -f mapped read
|
|
|
|
.PHONY: all check clean
|