Test a blit shader implementation

This commit is contained in:
2026-08-08 23:14:29 +01:00
parent f5ff6c70ea
commit ebd1801883
16 changed files with 372 additions and 8532 deletions
+9 -3
View File
@@ -13,7 +13,7 @@ VENDOR_INC := BUILDDIR + "/include"
VENDOR_LIB := BUILDDIR + "/lib"
VK_FLAGS := "-DPR_RHI_VULKAN -DVK_NO_PROTOTYPES -I" + VK_SDK + "/include -I" + VK_SDK + "/include/vma -I" + VENDOR_INC
APP_INC := "-I" + VK_SDK + "/include -I" + VK_SDK + "/include/vma -I" + VK_SDK + "/include/slang -I" + VENDOR_INC + " -Isrc"
APP_INC := "-I" + VK_SDK + "/include -I" + VK_SDK + "/include/vma -I" + VENDOR_INC + " -Isrc"
# Build KTX from source
vendor:
@@ -30,8 +30,14 @@ vendor:
cmake --build {{BUILDDIR}}/ktx --config Release
cmake --install {{BUILDDIR}}/ktx
# Compile shaders from .slang to SPIR-V
shaders:
mkdir -p {{BUILDDIR}}/shaders
{{VK_SDK}}/bin/slangc -target spirv -profile spirv_1_4 \
-o {{BUILDDIR}}/shaders/blit.spv assets/blit.slang
# Build all objects, then link
build: vendor
build: vendor shaders
mkdir -p {{BUILDDIR}}/bin
bear -- {{CXX}} -g -c -Wno-nullability-completeness {{VK_FLAGS}} \
src/prism/rhi/vulkan/profiles/vulkan_profiles.cpp \
@@ -50,7 +56,7 @@ build: vendor
bear -a -- {{CXX}} -g {{VK_FLAGS}} \
-L{{VK_SDK}}/lib -L{{VENDOR_LIB}} \
build/*.o \
-lSDL3 -lglm -ltinyobjloader -lktx -lslang -lvulkan \
-lSDL3 -lktx -lvulkan \
-Wl,-rpath,{{VENDOR_LIB}} -Wl,-rpath,{{VK_SDK}}/lib \
-o {{BUILDDIR}}/bin/prism
@echo "--- build done: {{BUILDDIR}}/bin/prism ---"