Skip to content

Commit 8404e62

Browse files
authored
Merge branch 'Devsh-Graphics-Programming:master' into hlsl
2 parents e05e236 + 1249981 commit 8404e62

File tree

503 files changed

+2511
-66650
lines changed

Some content is hidden

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

503 files changed

+2511
-66650
lines changed

.gitmodules

Lines changed: 7 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
@@ -90,3 +77,10 @@
9077
[submodule "examples_tests"]
9178
path = examples_tests
9279
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: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,20 @@ set(BUILD_SHARED_LIBS ${_OLD_BUILD_SHARED_LIBS})
1616
set(BUILD_STATIC_LIBS ${_OLD_BUILD_STATIC_LIBS})
1717
set(BUILD_TESTING ${_OLD_BUILD_TESTING})
1818

19-
2019
# openssl
2120
add_subdirectory(openssl openssl EXCLUDE_FROM_ALL)
2221

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

2434
# volk
2535
set(VOLK_PULL_IN_VULKAN OFF CACHE INTERNAL "" FORCE) # Needed to make sure vulkan library will not be linked in examples
@@ -38,25 +48,7 @@ endif()
3848

3949

4050
# TODO: redo
41-
find_package(OpenGL OPTIONAL_COMPONENTS EGL)
4251
find_package(Wayland) # TODO: remove, load Wayland dynamically
43-
#[[if (OpenGL_EGL_FOUND)
44-
message(FATAL_ERROR "FOUND EGL!!")
45-
else()
46-
message(FATAL_ERROR "COULDNT FIND EGL!!")
47-
endif()]]
48-
# EGL
49-
set(EGL_NO_GLEW ON CACHE INTERNAL "" FORCE)
50-
if (OpenGL_EGL_FOUND AND UNIX AND NOT APPLE)
51-
# TODO: This Cannot work like that!
52-
set(EGL_PASSTHROUGH ON FORCE)
53-
if (WAYLAND_CLIENT_FOUND)
54-
set(EGL_USE_WAYLAND ON FORCE)
55-
message(FATAL_ERROR "Using Wayland backend!!!")
56-
endif()
57-
endif()
58-
# all of the above fuckery can be dismissed
59-
add_subdirectory(EGL/EGL)
6052

6153

6254
# zlib (target is zlibstatic)
@@ -111,14 +103,13 @@ set(ZLIB_LIBRARY # for PNGLIB purposes
111103
$<$<CONFIG:RelWithDebInfo>:${ZLIB_LIBRARY_RELWITHDEBINFO}>
112104
CACHE INTERNAL "" FORCE)
113105

114-
115106
set(SPIRV_HEADERS_SKIP_INSTALL ON CACHE INTERNAL "Skip SPIRV-Headers install")
116107
set(SPIRV_HEADERS_SKIP_EXAMPLES ON CACHE INTERNAL "Skip SPIRV-Headers examples")
117-
add_subdirectory(SPIRV-Headers SPIRV-Headers EXCLUDE_FROM_ALL)
108+
add_subdirectory(dxc/dxc/external/SPIRV-Headers dxc/external/SPIRV-Headers EXCLUDE_FROM_ALL)
118109
set(SKIP_SPIRV_TOOLS_INSTALL ON CACHE INTERNAL "Skip SPIRV-Tools install")
119110
set(SPIRV_SKIP_TESTS ON CACHE INTERNAL "Skip SPIRV-Tools tests")
120111
set(SPIRV_SKIP_EXECUTABLES ON CACHE INTERNAL "Skip SPIRV-Tools executable build")
121-
add_subdirectory(SPIRV-Tools SPIRV-Tools EXCLUDE_FROM_ALL)
112+
add_subdirectory(dxc/dxc/external/SPIRV-Tools dxc/external/SPIRV-Tools EXCLUDE_FROM_ALL)
122113
set(SKIP_GLSLANG_INSTALL ON CACHE INTERNAL "Skip glslang install")
123114
set(ENABLE_SPVREMAPPER OFF CACHE INTERNAL "SPVRemapper is a spirv compression experimental library")
124115
set(ENABLE_GLSLANG_BINARIES OFF CACHE INTERNAL "Build glslangValidator and spirv-remap?")
@@ -322,8 +313,7 @@ set(NBL_3RDPARTY_TARGETS
322313
GenericCodeGen
323314
SPIRV
324315
SPIRV-Tools-static # SPIRV-Tools-shared in case of SHARED lib
325-
SPIRV-Tools-opt
326-
egl
316+
SPIRV-Tools-opt
327317
)
328318
if (_NBL_COMPILE_WITH_OPEN_EXR_)
329319
list(APPEND NBL_3RDPARTY_TARGETS

3rdparty/EGL

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

0 commit comments

Comments
 (0)