Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Commit

Permalink
Merge branch '2020.x' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
azhirnov committed Sep 22, 2020
2 parents 520d284 + 1f9fa42 commit 69540bb
Show file tree
Hide file tree
Showing 433 changed files with 72,983 additions and 7,871 deletions.
9 changes: 3 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.user
*.glsl_dbg
/build
/tests/framegraph/Graphs
/external/glfw
/external/glslang
/external/lodepng
Expand All @@ -21,11 +22,7 @@
/external/OpenVR
/external/prebuild
/external/ffmpeg
/tests/framegraph/Graphs
/samples/_data
/external/SPIRV-Cross
/external/SPIRV-Reflect
/external/tinyobj
/external/stb
external/glsl_trace
external/FileSystem
/external/glsl_trace
/external/FileSystem
46 changes: 36 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ matrix:
script:
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DFG_CI_BUILD=ON -DFG_EXTERNALS_USE_PREBUILD=OFF ..
- cmake -DCMAKE_BUILD_TYPE=Release -DFG_CI_BUILD=ON -DFG_EXTERNALS_USE_PREBUILD=OFF -DFG_VULKAN_VERSION=110 ..
- cmake --build . --config Release
- ctest --verbose

Expand All @@ -47,25 +47,25 @@ matrix:
script:
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DFG_CI_BUILD=ON -DFG_EXTERNALS_USE_PREBUILD=OFF ..
- cmake -DCMAKE_BUILD_TYPE=Release -DFG_CI_BUILD=ON -DFG_EXTERNALS_USE_PREBUILD=OFF -DFG_VULKAN_VERSION=120 ..
- cmake --build . --config Release
- ctest --verbose

# Linux x64 Clang 8
# Linux x64 Clang 9
#- os: linux
# name: Linux64 Clang 8
# name: Linux64 Clang 9
# dist: xenial
# compiler: clang
# addons:
# apt:
# sources:
# - ubuntu-toolchain-r-test
# - llvm-toolchain-xenial-8
# - llvm-toolchain-xenial-9
# packages:
# - xorg-dev
# - clang-8
# - clang-9
# before_install:
# - eval "CC=clang-8 && CXX=clang++-8"
# - eval "CC=clang-9 && CXX=clang++-9"
# # Download and install cmake
# - mkdir $HOME/cmake;
# - export PATH="$HOME/cmake/bin:$PATH";
Expand All @@ -90,7 +90,7 @@ matrix:
script:
- mkdir -p build
- cd build
- cmake -G "Visual Studio 15 2017" -DFG_CI_BUILD=ON ..
- cmake -G "Visual Studio 15 2017" -DFG_CI_BUILD=ON -DFG_VULKAN_VERSION=100 ..
- cmake --build . --config Release
- ctest -C Release --verbose

Expand All @@ -100,7 +100,7 @@ matrix:
script:
- mkdir -p build
- cd build
- cmake -G "Visual Studio 15 2017 Win64" -DFG_CI_BUILD=ON -DFG_EXTERNALS_USE_PREBUILD=ON ..
- cmake -G "Visual Studio 15 2017 Win64" -DFG_CI_BUILD=ON -DFG_EXTERNALS_USE_PREBUILD=ON -DFG_VULKAN_VERSION=110 ..
- cmake --build . --config Release
- ctest -C Release --verbose

Expand All @@ -116,6 +116,32 @@ matrix:
script:
- mkdir -p build
- cd build
- cmake -G "Visual Studio 15 2017 Win64" -DFG_CI_BUILD=ON -DFG_EXTERNALS_USE_PREBUILD=OFF -DFG_ENABLE_MEMLEAK_CHECKS=ON ..
- cmake -G "Visual Studio 15 2017 Win64" -DFG_CI_BUILD=ON -DFG_EXTERNALS_USE_PREBUILD=OFF -DFG_ENABLE_MEMLEAK_CHECKS=ON -DFG_VULKAN_VERSION=120 ..
- cmake --build . --config Debug
- ctest -C Debug --verbose

# Android
- os: android
name: android
language: android
sudo: true
android:
components:
- tools
- platform-tools
- extra-google-m2repository
- extra-android-m2repository
addons:
apt_packages:
- pandoc
before_install:
- sudo apt-get install ant
install:
- echo y | sdkmanager "ndk-bundle"
- echo y | sdkmanager --channel=3 --channel=1 "cmake;3.10.2.4988404"
before_script:
- export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle
script:
- cd ./android
- chmod +x gradlew
- ./gradlew build
79 changes: 57 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,48 @@
cmake_minimum_required( VERSION 3.11 FATAL_ERROR )
cmake_minimum_required( VERSION 3.10 FATAL_ERROR )

message( STATUS "==========================================================================\n" )
message( STATUS "project 'FrameGraph' generation started" )

project( "FrameGraph"
VERSION 2020.2.1
VERSION 2020.3.1
LANGUAGES C CXX )

set_property( GLOBAL PROPERTY USE_FOLDERS ON )
message( STATUS "Compiler: ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER_VERSION})" )
message( STATUS "target system: ${CMAKE_SYSTEM_NAME} (${CMAKE_SYSTEM_VERSION})" )
message( STATUS "host system: ${CMAKE_HOST_SYSTEM_NAME} (${CMAKE_HOST_SYSTEM_VERSION})" )

set( FG_ENABLE_STDALLOC OFF CACHE BOOL "custom std allocators (optional)" )
if (DEFINED ANDROID)
set( FG_ENABLE_GLSL_TRACE OFF )
else ()
set( FG_ENABLE_GLSL_TRACE ON )
endif ()

if (WIN32)
set( FG_ENABLE_OPENVR OFF )
set( FG_ENABLE_ASSIMP ON )
set( FG_ENABLE_DEVIL ON )
set( FG_ALLOW_GPL OFF )
set( FG_ENABLE_FFMPEG OFF )
else ()
set( FG_ENABLE_OPENVR OFF )
set( FG_ENABLE_ASSIMP OFF )
set( FG_ENABLE_DEVIL OFF )
set( FG_ALLOW_GPL OFF )
set( FG_ENABLE_FFMPEG OFF ) # not supported
endif ()

set( FG_NO_EXCEPTIONS ON CACHE BOOL "disable C++ exceptions" )
#set( FG_ENABLE_STDALLOC OFF CACHE BOOL "custom std allocators (optional)" )
set( FG_ENABLE_GLSLANG ON CACHE BOOL "use glslang (optional, required for glsl compilation)" )
set( FG_ENABLE_VMA ON CACHE BOOL "use Vulkan Memory Allocator (required)" )
set( FG_ENABLE_OPENVR ON CACHE BOOL "use OpenVR (optional)" )
set( FG_ENABLE_OPENVR ${FG_ENABLE_OPENVR} CACHE BOOL "use OpenVR (optional)" )
set( FG_ENABLE_SIMPLE_COMPILER_OPTIONS OFF CACHE BOOL "use simplified compiler settings if you have problem with it" )
set( FG_EXTERNALS_USE_STABLE_VERSIONS ON CACHE BOOL "use last stable version instead of master branch" )
set( FG_EXTERNALS_USE_PREBUILD OFF CACHE BOOL "use stable prebuild libraries" )
set( FG_ENABLE_GLSL_TRACE ON CACHE BOOL "used for shader debugging and profiling" )
set( FG_USE_VULKAN_SDK OFF CACHE BOOL "use vulkan headers and glslang source from VulkanSDK" )

set( FG_ENABLE_GLSL_TRACE ${FG_ENABLE_GLSL_TRACE} CACHE BOOL "used for shader debugging and profiling" )
set( FG_VULKAN_VERSION "110" CACHE STRING "choose target Vulkan API version" )
set( FG_ENABLE_MEMLEAK_CHECKS ON CACHE BOOL "" )

# test & samples dependencies
set( FG_ENABLE_TESTS ON CACHE BOOL "enable tests" )
Expand All @@ -35,21 +56,27 @@ set( FG_ENABLE_SPIRVREFLECT ON CACHE BOOL "for runtime spirv shader reflection (
set( FG_ENABLE_IMGUI ON CACHE BOOL "use imgui (optional, required for UI extension)" )

# Scene dependencies
set( FG_ENABLE_ASSIMP ON CACHE BOOL "use Assimp (optional, required for Scene extension)" )
set( FG_ENABLE_ASSIMP ${FG_ENABLE_ASSIMP} CACHE BOOL "use Assimp (optional, required for Scene extension)" )
set( FG_ENABLE_GLM ON CACHE BOOL "use glm (optional, required for Scene extension)" )
set( FG_ENABLE_DEVIL ON CACHE BOOL "use DevIL (optional, required for Scene extension)" )
set( FG_ENABLE_FREEIMAGE OFF CACHE BOOL "use FreeImage (optional, GPL license)" )
set( FG_ENABLE_FFMPEG OFF CACHE BOOL "use FFmpeg (optional, LGPL license)" )
set( FG_ALLOW_GPL OFF CACHE BOOL "allow GNU GPL code and libraries" )

set( FG_ENABLE_DEVIL ${FG_ENABLE_DEVIL} CACHE BOOL "use DevIL (optional, required for Scene extension)" )
set( FG_ENABLE_FFMPEG ${FG_ENABLE_FFMPEG} CACHE BOOL "use FFmpeg (optional, LGPL license)" )
set( FG_ALLOW_GPL ${FG_ALLOW_GPL} CACHE BOOL "allow GNU GPL code and libraries" )

set( CMAKE_DEBUG_POSTFIX "d" )
set( CMAKE_RELEASE_POSTFIX "" )
set( CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "installation directory" FORCE )
set( MAIN_BINARY_DIR "${CMAKE_BINARY_DIR}/bin" CACHE INTERNAL "" FORCE )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${MAIN_BINARY_DIR}" )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${MAIN_BINARY_DIR}" )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${MAIN_BINARY_DIR}" )

if (DEFINED ANDROID)
set( CMAKE_DEBUG_POSTFIX "" )
set( CMAKE_RELEASE_POSTFIX "" )
else ()
set( CMAKE_DEBUG_POSTFIX "d" )
set( CMAKE_RELEASE_POSTFIX "" )

# this settings breaks native debugger on android
set( CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "installation directory" )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${MAIN_BINARY_DIR}" CACHE INTERNAL "" FORCE )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${MAIN_BINARY_DIR}" CACHE INTERNAL "" FORCE )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${MAIN_BINARY_DIR}" CACHE INTERNAL "" FORCE )
endif ()

if (${FG_ENABLE_SIMPLE_COMPILER_OPTIONS})
include( "cmake/compilers_minimal.cmake" )
Expand All @@ -60,12 +87,17 @@ include( "cmake/compiler_tests.cmake" )
include( "cmake/ci_build.cmake" )
include( "cmake/version.cmake" )

add_subdirectory( "external" )
if (DEFINED ANDROID)
add_subdirectory( "external/android" )
else ()
add_subdirectory( "external" )
endif ()

include( "cmake/project_template.cmake" )
add_subdirectory( "stl" )
add_subdirectory( "extensions/vulkan_loader" )
add_subdirectory( "extensions/framework" )
add_subdirectory( "framegraph" )
add_subdirectory( "extensions/framework" )
add_subdirectory( "extensions/pipeline_compiler" )
add_subdirectory( "extensions/pipeline_reflection" )
add_subdirectory( "extensions/scene" )
Expand All @@ -74,14 +106,17 @@ add_subdirectory( "extensions/graphviz" )
add_subdirectory( "extensions/video" )

if (${FG_ENABLE_TESTS})
enable_testing()
if (NOT DEFINED ANDROID)
enable_testing()
endif ()
add_subdirectory( "tests/stl" )
add_subdirectory( "tests/framegraph" )
add_subdirectory( "tests/framework" )
add_subdirectory( "tests/pipeline_compiler" )
add_subdirectory( "tests/pipeline_reflection" )
add_subdirectory( "tests/scene" )
add_subdirectory( "tests/ui" )
add_subdirectory( "tests/android" )
endif ()

message( STATUS "project 'FrameGraph' generation ended" )
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Used vulkan features and extensions:
* specialization constants
* VK_EXT_debug_utils
* VK_KHR_dedicated_allocation
* VK_KHR_sampler_mirror_clamp_to_edge
* VK_EXT_descriptor_indexing
* VK_NV_mesh_shader
* VK_NV_shading_rate_image
Expand All @@ -43,12 +44,14 @@ Used vulkan features and extensions:

## Suported Platforms
* Windows (with MSVC 2017, 2019)
* Linux (with GCC 8.2)
* Linux (with GCC 8.2, Clang 9)
* Android (Clang)


## Building
Generate project with CMake and build.<br/>
Required C++17 standard support and CMake 3.11 and greater.<br/>
Required C++17 standard support and CMake 3.10.<br/>
Reequired internet connection to download external dependencies.<br/>

Dependencies:<br/>
[Vulkan-headers](https://github.com/KhronosGroup/Vulkan-Headers) or [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) - required.<br/>
Expand All @@ -61,7 +64,6 @@ Dependencies:<br/>
[graphviz](https://www.graphviz.org/) - (optional) for graph visualization.<br/>
[Assimp](https://github.com/assimp/assimp) - (optional) for Scene extension.<br/>
[DevIL](http://openil.sourceforge.net/) - (optional) for Scene extension.<br/>
[FreeImage](http://freeimage.sourceforge.net/) - (optional) for Scene extension.<br/>
[imgui](https://github.com/ocornut/imgui) - (optional) for UI extension.<br/>
[OpenVR](https://github.com/ValveSoftware/openvr) - (optional) for VR support.<br/>
[GLM](https://glm.g-truc.net/0.9.9/index.html) - (optional) for Scene extension.<br/>
Expand Down
7 changes: 7 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.idea
*.iml
.gradle
/local.properties
/build
/captures
/keystore
17 changes: 17 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
}
}

allprojects {
repositories {
google()
jcenter()
}
}
Binary file added android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Sat Jul 25 16:34:40 MSK 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
Loading

0 comments on commit 69540bb

Please sign in to comment.