Skip to content

Commit 2b2dc0e

Browse files
committed
Merge branch 'master' into HEAD
2 parents 1c8afe0 + 258f364 commit 2b2dc0e

File tree

479 files changed

+26741
-77963
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

479 files changed

+26741
-77963
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ doctemp/*
2626
source/obj
2727
source/Irrlicht/libIrrlichtServer.a
2828
# stuff output by examples
29-
examples_tests/*/bin/*
29+
examples_tests/*
3030
examples_tests/tmp/*
3131
android-sample/bin/*

.gitmodules

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
[submodule "3rdparty/SPIRV-Headers"]
2-
path = 3rdparty/SPIRV-Headers
3-
url = https://github.com/KhronosGroup/SPIRV-Headers.git
4-
[submodule "3rdparty/SPIRV-Tools"]
5-
path = 3rdparty/SPIRV-Tools
6-
url = https://github.com/KhronosGroup/SPIRV-Tools.git
71
[submodule "3rdparty/glslang"]
82
path = 3rdparty/glslang
93
url = https://github.com/devshgraphicsprogramming/glslang.git
@@ -55,19 +49,12 @@
5549
[submodule "3rdparty/parallel-hashmap"]
5650
path = 3rdparty/parallel-hashmap
5751
url = https://github.com/greg7mdp/parallel-hashmap
58-
[submodule "3rdparty/radeonrays"]
59-
path = 3rdparty/radeonrays
60-
url = git@github.com:devshgraphicsprogramming/RadeonRays_SDK.git
61-
branch = baw
6252
[submodule "3rdparty/jitify"]
6353
path = 3rdparty/jitify
6454
url = https://github.com/NVIDIA/jitify
6555
[submodule "3rdparty/volk"]
6656
path = 3rdparty/volk
6757
url = https://github.com/zeux/volk.git
68-
[submodule "3rdparty/EGL"]
69-
path = 3rdparty/EGL
70-
url = https://github.com/Crisspl/EGL.git
7158
[submodule "3rdparty/simdjson"]
7259
path = 3rdparty/simdjson
7360
url = https://github.com/simdjson/simdjson.git
@@ -87,3 +74,13 @@
8774
path = 3rdparty/Vulkan-Headers
8875
url = git@github.com:KhronosGroup/Vulkan-Headers.git
8976
branch = main
77+
[submodule "examples_tests"]
78+
path = examples_tests
79+
url = git@github.com:Devsh-Graphics-Programming/Nabla-Examples-and-Tests.git
80+
[submodule "3rdparty/dxc/dxc"]
81+
path = 3rdparty/dxc/dxc
82+
url = git@github.com:Devsh-Graphics-Programming/DirectXShaderCompiler.git
83+
branch = devshFixes
84+
[submodule "3rdparty/tcpp"]
85+
path = 3rdparty/tcpp
86+
url = git@github.com:Erfan-Ahmadi/tcpp.git

3rdparty/CMakeLists.txt

Lines changed: 25 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,6 @@
44

55
include(../cmake/common.cmake)
66

7-
# mandatory
8-
option(NBL_UPDATE_GIT_SUBMODULE "" ON)
9-
10-
if(NBL_UPDATE_GIT_SUBMODULE)
11-
update_git_submodule(./volk)
12-
update_git_submodule(./SPIRV-Headers)
13-
update_git_submodule(./SPIRV-Tools)
14-
update_git_submodule(./glslang)
15-
update_git_submodule(./shaderc)
16-
update_git_submodule(./bzip2)
17-
update_git_submodule(./lz4)
18-
update_git_submodule(./nbl_spirv_cross)
19-
update_git_submodule(./zlib)
20-
update_git_submodule(./openexr)
21-
update_git_submodule(./libpng)
22-
update_git_submodule(./openssl)
23-
update_git_submodule(./libjpeg-turbo)
24-
update_git_submodule(./parallel-hashmap)
25-
update_git_submodule(./gli)
26-
# exceptions that get automatically cloned
27-
update_git_submodule(./glm)
28-
update_git_submodule(./freetype2)
29-
update_git_submodule(./portable-file-dialogs)
30-
update_git_submodule(./simdjson)
31-
update_git_submodule(./glTFSampleModels)
32-
update_git_submodule(./pstl/oneTBB)
33-
update_git_submodule(./pstl/oneDPL/oneDPL)
34-
endif()
35-
367
# simdjson
378
set(_OLD_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
389
set(_OLD_BUILD_STATIC_LIBS ${BUILD_STATIC_LIBS})
@@ -45,10 +16,24 @@ set(BUILD_SHARED_LIBS ${_OLD_BUILD_SHARED_LIBS})
4516
set(BUILD_STATIC_LIBS ${_OLD_BUILD_STATIC_LIBS})
4617
set(BUILD_TESTING ${_OLD_BUILD_TESTING})
4718

48-
4919
# openssl
5020
add_subdirectory(openssl openssl EXCLUDE_FROM_ALL)
5121

22+
# DXC
23+
set(SPIRV-Headers_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dxc/dxc/external/SPIRV-Headers")
24+
if(WIN32)
25+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:fast")
26+
elseif(UNIX)
27+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math")
28+
endif()
29+
option(_NBL_ENABLE_DXC_COMPILE_TESTS_ "Enable it in order to test compilation of Nabla shaders at build time" OFF)
30+
option(_NBL_DXC_COMPILE_TESTS_ENABLE_CMAKE_LOG_ "Enable more verbose log when creating DXC compile test target - only for Nabla developers!" OFF)
31+
set(_NBL_DXC_CT_PREFIX_CMAKE_LOG_DEBUG_ "[DXC_CT]:" CACHE INTERNAL "only for Nabla developers")
32+
add_subdirectory(dxc dxc EXCLUDE_FROM_ALL)
33+
34+
if(_NBL_ENABLE_DXC_COMPILE_TESTS_)
35+
message(STATUS "_NBL_ENABLE_DXC_COMPILE_TESTS_ enabled, DXC compile test target will be executed at build time!")
36+
endif()
5237

5338
# volk
5439
set(VOLK_PULL_IN_VULKAN OFF CACHE INTERNAL "" FORCE) # Needed to make sure vulkan library will not be linked in examples
@@ -66,28 +51,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
6651
endif()
6752

6853

69-
# TODO: redo
70-
find_package(OpenGL OPTIONAL_COMPONENTS EGL)
71-
find_package(Wayland) # TODO: remove, load Wayland dynamically
72-
#[[if (OpenGL_EGL_FOUND)
73-
message(FATAL_ERROR "FOUND EGL!!")
74-
else()
75-
message(FATAL_ERROR "COULDNT FIND EGL!!")
76-
endif()]]
77-
# EGL
78-
set(EGL_NO_GLEW ON CACHE INTERNAL "" FORCE)
79-
if (OpenGL_EGL_FOUND AND UNIX AND NOT APPLE)
80-
# TODO: This Cannot work like that!
81-
set(EGL_PASSTHROUGH ON FORCE)
82-
if (WAYLAND_CLIENT_FOUND)
83-
set(EGL_USE_WAYLAND ON FORCE)
84-
message(FATAL_ERROR "Using Wayland backend!!!")
85-
endif()
86-
endif()
87-
# all of the above fuckery can be dismissed
88-
add_subdirectory(EGL/EGL)
89-
90-
9154
# zlib (target is zlibstatic)
9255
set(_OLD_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
9356
set(_OLD_SKIP_INSTALL_ALL ${SKIP_INSTALL_ALL})
@@ -140,14 +103,13 @@ set(ZLIB_LIBRARY # for PNGLIB purposes
140103
$<$<CONFIG:RelWithDebInfo>:${ZLIB_LIBRARY_RELWITHDEBINFO}>
141104
CACHE INTERNAL "" FORCE)
142105

143-
144106
set(SPIRV_HEADERS_SKIP_INSTALL ON CACHE INTERNAL "Skip SPIRV-Headers install")
145107
set(SPIRV_HEADERS_SKIP_EXAMPLES ON CACHE INTERNAL "Skip SPIRV-Headers examples")
146-
add_subdirectory(SPIRV-Headers SPIRV-Headers EXCLUDE_FROM_ALL)
108+
add_subdirectory(dxc/dxc/external/SPIRV-Headers dxc/external/SPIRV-Headers EXCLUDE_FROM_ALL)
147109
set(SKIP_SPIRV_TOOLS_INSTALL ON CACHE INTERNAL "Skip SPIRV-Tools install")
148110
set(SPIRV_SKIP_TESTS ON CACHE INTERNAL "Skip SPIRV-Tools tests")
149111
set(SPIRV_SKIP_EXECUTABLES ON CACHE INTERNAL "Skip SPIRV-Tools executable build")
150-
add_subdirectory(SPIRV-Tools SPIRV-Tools EXCLUDE_FROM_ALL)
112+
add_subdirectory(dxc/dxc/external/SPIRV-Tools dxc/external/SPIRV-Tools EXCLUDE_FROM_ALL)
151113
set(SKIP_GLSLANG_INSTALL ON CACHE INTERNAL "Skip glslang install")
152114
set(ENABLE_SPVREMAPPER OFF CACHE INTERNAL "SPVRemapper is a spirv compression experimental library")
153115
set(ENABLE_GLSLANG_BINARIES OFF CACHE INTERNAL "Build glslangValidator and spirv-remap?")
@@ -359,16 +321,16 @@ set(NBL_3RDPARTY_TARGETS
359321
shaderc_util
360322
shaderc
361323
jpeg-static
362-
bzip2
324+
bzip2
325+
simdjson
363326
glslang
364327
OGLCompiler
365328
OSDependent
366329
MachineIndependent
367330
GenericCodeGen
368331
SPIRV
369332
SPIRV-Tools-static # SPIRV-Tools-shared in case of SHARED lib
370-
SPIRV-Tools-opt
371-
egl
333+
SPIRV-Tools-opt
372334
)
373335
if (_NBL_COMPILE_WITH_OPEN_EXR_)
374336
list(APPEND NBL_3RDPARTY_TARGETS
@@ -399,8 +361,11 @@ if(ENABLE_HLSL)
399361
endif()
400362

401363
foreach(trgt IN LISTS NBL_3RDPARTY_TARGETS)
402-
set_property(TARGET ${trgt} PROPERTY
403-
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
364+
if(NBL_DYNAMIC_MSVC_RUNTIME)
365+
set_property(TARGET ${trgt} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
366+
else()
367+
set_property(TARGET ${trgt} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
368+
endif()
404369
endforeach()
405370

406371
set(_NBL_3RDPARTY_TARGETS_ ${NBL_3RDPARTY_TARGETS} PARENT_SCOPE)

3rdparty/EGL

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)