Commit 7573d332 authored by Florian Oetke's avatar Florian Oetke
Browse files

Merge branch 'develop' into 'master'

Update master to current stable develop

See merge request lowkey42/mirrage!10
parents e289bdcf 150f1274
Pipeline #2254 failed with stage
in 1 minute and 8 seconds
......@@ -11,43 +11,59 @@ build_gcc:
script:
- export CC=gcc
- export CXX=g++
- mkdir build
- mkdir -p build
- cd build
- mkdir bin
- mkdir -p bin
- rm -rf src
- cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=../bin -DCMAKE_BUILD_TYPE=Release -DMIRRAGE_EXPORT_EXECUTABLE=ON ..
- cmake --build . --target src/install
- cmake --build . --target test
artifacts:
paths:
- build/bin
expire_in: 1 day
cache:
key: "gcc_${CI_COMMIT_REF_SLUG}"
paths:
- build
build_clang:
stage: build
script:
- export CC=clang
- export CXX=clang++
- mkdir build
- mkdir -p build
- cd build
- mkdir bin
- mkdir -p bin
- rm -rf src
- cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=../bin -DCMAKE_BUILD_TYPE=Release -DMIRRAGE_EXPORT_EXECUTABLE=ON ..
- cmake --build . --target src/install
- cmake --build . --target test
- wget https://github.com/lowkey42/mirrage/releases/download/v0.2/model_data_lbs.tar.xz || true
- cd bin/bin
- tar xf ../../model_data_lbs.tar.xz
artifacts:
paths:
- build/bin
expire_in: 1 week
cache:
key: "clang_${CI_COMMIT_REF_SLUG}"
paths:
- build
build_scanbuild:
stage: build
script:
- export CC=clang
- export CXX=clang++
- mkdir build
- mkdir -p build
- cd build
- scan-build --use-c++=clang++ --use-cc=clang cmake -DMIRRAGE_FORCE_LIBCPP=ON -G "Unix Makefiles" ..
- scan-build --use-c++=clang++ --use-cc=clang -enable-checker deadcode.DeadStores -enable-checker security.insecureAPI.UncheckedReturn --status-bugs -v cmake --build .
- scan-build --use-c++=clang++ --use-cc=clang cmake -DMIRRAGE_FORCE_LIBCPP=ON -DMIRRAGE_ENABLE_COTIRE=OFF -G "Unix Makefiles" ..
- scan-build -o result --use-c++=clang++ --use-cc=clang -enable-checker deadcode.DeadStores -enable-checker security.insecureAPI.UncheckedReturn --status-bugs -v cmake --build . || true
artifacts:
paths:
- /tmp/scan-build-*
- build/result
expire_in: 1 week
when: always
......@@ -4,3 +4,36 @@
[submodule "dependencies/plog"]
path = dependencies/plog
url = https://github.com/SergiusTheBest/plog.git
[submodule "dependencies/assimp"]
path = dependencies/assimp
url = https://github.com/assimp/assimp.git
[submodule "dependencies/asyncplusplus"]
path = dependencies/asyncplusplus
url = https://github.com/lowkey42/asyncplusplus.git
[submodule "dependencies/glm"]
path = dependencies/glm
url = https://github.com/g-truc/glm.git
[submodule "dependencies/GSL"]
path = dependencies/GSL
url = https://github.com/Microsoft/GSL.git
[submodule "dependencies/magic_get"]
path = dependencies/magic_get
url = https://github.com/apolukhin/magic_get.git
[submodule "dependencies/nuklear"]
path = dependencies/nuklear
url = https://github.com/vurtun/nuklear.git
[submodule "dependencies/physfs"]
path = dependencies/physfs
url = https://github.com/lowkey42/physfs.git
[submodule "dependencies/robin-map"]
path = dependencies/robin-map
url = https://github.com/Tessil/robin-map.git
[submodule "dependencies/sf2"]
path = dependencies/sf2
url = https://github.com/lowkey42/sf2.git
[submodule "dependencies/moodycamel"]
path = dependencies/moodycamel
url = https://github.com/cameron314/concurrentqueue.git
[submodule "dependencies/doctest"]
path = dependencies/doctest
url = https://github.com/onqtam/doctest.git
......@@ -6,8 +6,8 @@
if [ $ANALYZE = "true" ]; then
if [ "$CC" = "clang" ]; then
docker exec build scan-build --use-c++=clang++ cmake -DMIRRAGE_FORCE_LIBCPP=ON -G "Unix Makefiles" -H/repo -B/build
docker exec build scan-build --use-c++=clang++ -enable-checker deadcode.DeadStores \
docker exec build scan-build --use-c++=clang++ --use-cc=clang cmake -DMIRRAGE_FORCE_LIBCPP=ON -DMIRRAGE_ENABLE_COTIRE=OFF -G "Unix Makefiles" -H/repo -B/build
docker exec build scan-build --use-c++=clang++ --use-cc=clang -enable-checker deadcode.DeadStores \
-enable-checker security.insecureAPI.UncheckedReturn \
--status-bugs -v \
cmake --build /build
......
......@@ -14,7 +14,6 @@ env:
- CACHE_FILE_DI=$CACHE_DIR/docker_image.tar.gz
matrix:
- ANALYZE=false
- ANALYZE=true
matrix:
exclude:
......
......@@ -20,6 +20,26 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL
endif()
endif()
if (UNIX AND NOT APPLE)
execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=lld -Wl,--version ERROR_QUIET OUTPUT_VARIABLE ld_version)
if ("${ld_version}" MATCHES "LLD")
message("using LLD linker")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld -Wl,--threads,--build-id=none")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld -Wl,--threads,--build-id=none")
else()
message("OUT ${ld_version}")
execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE ld_version)
if ("${ld_version}" MATCHES "GNU gold")
message("using gold linker")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold -Wl,--disable-new-dtags")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=gold -Wl,--disable-new-dtags")
else()
message("using default linker")
endif()
endif()
endif()
option(MIRRAGE_FORCE_LIBCPP "Force usage of libc++ instead of libstdc++ intependent of the used compiler. " OFF)
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR MIRRAGE_FORCE_LIBCPP)
option(MIRRAGE_USE_LIBCPP "Uses libc++ instead of libstdc++. " ON)
......@@ -49,6 +69,26 @@ else()
option(MIRRAGE_BUILD_DEMO "Build the demo application" OFF)
endif()
option(MIRRAGE_ENABLE_COTIRE "Enable cotire" ON)
if(MIRRAGE_ENABLE_COTIRE)
include(cotire OPTIONAL)
if(COMMAND cotire)
add_definitions(-DGLM_FORCE_RADIANS -DGLM_FORCE_DEPTH_ZERO_TO_ON -DGLM_ENABLE_EXPERIMENTAL -DGLM_FORCE_CXX14)
add_compile_options(-pthread)
set_property(GLOBAL PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PATH "${ROOT_DIR}/dependencies")
set_property(GLOBAL PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH "${ROOT_DIR}/dependencies/nuklear;${ROOT_DIR}/src;${ROOT_DIR}/dependencies/moodycamel/concurrentqueue.h")
set_property(GLOBAL PROPERTY COTIRE_ADD_UNITY_BUILD FALSE)
endif()
endif()
option(MIRRAGE_ENABLE_TESTS "Enable unit tests" ON)
if(MIRRAGE_ENABLE_TESTS)
enable_testing()
endif()
add_subdirectory(dependencies)
add_subdirectory(src)
......@@ -21,8 +21,8 @@ Mirrage (Mirrage Indirect Radiance Renderer And Game Engine) is a Vulkan based d
### Dependencies
Required:
- CMake >= 3.8
- SDL2 >= 2.0.7
- Vulkan + Vulkan-HPP >= 1.1.70
- SDL2 >= 2.0.8
- Vulkan + Vulkan-HPP >= 1.1.80
- GLSLC (if MIRRAGE_COMPILE_SHADERS is ON)
......
......@@ -3,15 +3,27 @@ shader: = shader/
vert_shader:blit = shader/bin/fullscreen.vert.spv
frag_shader:blit = shader/bin/blit.frag.spv
vert_shader:debug_draw = shader/bin/debug_draw.vert.spv
frag_shader:debug_draw = shader/bin/debug_draw.frag.spv
vert_shader:light_directional = shader/bin/fullscreen.vert.spv
frag_shader:light_directional = shader/bin/light_directional.frag.spv
vert_shader:light_point = shader/bin/light_point.vert.spv
frag_shader:light_point = shader/bin/light_point.frag.spv
vert_shader:shadow_model = shader/bin/shadow_model.vert.spv
vert_shader:shadow_model_animated = shader/bin/shadow_model_animated.vert.spv
vert_shader:shadow_model_animated_dqs = shader/bin/shadow_model_animated_dqs.vert.spv
frag_shader:shadow_model = shader/bin/shadow_model.frag.spv
vert_shader:model = shader/bin/model.vert.spv
vert_shader:model_animated = shader/bin/model_animated.vert.spv
vert_shader:model_animated_dqs = shader/bin/model_animated_dqs.vert.spv
frag_shader:model = shader/bin/model.frag.spv
frag_shader:model_emissive = shader/bin/model_emissive.frag.spv
frag_shader:model_alphatest = shader/bin/model_alphatest.frag.spv
vert_shader:ui = shader/bin/ui.vert.spv
frag_shader:ui = shader/bin/ui.frag.spv
......@@ -56,12 +68,15 @@ frag_shader:gi_spec_blur = shader/bin/gi_spec_blur.frag.spv
vert_shader:gi_reproject = shader/bin/fullscreen.vert.spv
frag_shader:gi_reproject = shader/bin/gi_reproject.frag.spv
vert_shader:gi_reprojection_weights = shader/bin/fullscreen.vert.spv
frag_shader:gi_reprojection_weights = shader/bin/gi_reprojection_weights.frag.spv
vert_shader:gi_weight_mipgen = shader/bin/fullscreen.vert.spv
frag_shader:gi_weight_mipgen = shader/bin/gi_weight_mipgen.frag.spv
vert_shader:median_filter = shader/bin/fullscreen.vert.spv
frag_shader:median_filter = shader/bin/median_filter.frag.spv
vert_shader:voxelization = shader/bin/voxelization.vert.spv
frag_shader:voxelization = shader/bin/voxelization.frag.spv
vert_shader:luminance = shader/bin/fullscreen.vert.spv
frag_shader:luminance = shader/bin/luminance.frag.spv
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment