Skip to content

Commit b60490b

Browse files
committed
Merge branch 'hazardu-dxc-compile-flags' into nahim_ndt
2 parents c1d776b + 7ef1c2f commit b60490b

File tree

75 files changed

+2471
-2271
lines changed

Some content is hidden

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

75 files changed

+2471
-2271
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@
7878
path = 3rdparty/dxc/dxc
7979
url = git@github.com:Devsh-Graphics-Programming/DirectXShaderCompiler.git
8080
branch = devshFixes
81-
[submodule "3rdparty/tcpp"]
82-
path = 3rdparty/tcpp
83-
url = git@github.com:Erfan-Ahmadi/tcpp.git
8481
[submodule "3rdparty/imgui"]
8582
path = 3rdparty/imgui
8683
url = git@github.com:Devsh-Graphics-Programming/imgui.git

3rdparty/boost/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ set(BOOST_PREPROCESSOR_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/superproject/libs/pr
33
get_filename_component(_BOOST_PREPROCESSOR_BR_BUNDLE_SEARCH_DIRECTORY_ "${BOOST_PREPROCESSOR_INCLUDE}" ABSOLUTE)
44
get_filename_component(_BOOST_PREPROCESSOR_BR_OUTPUT_DIRECTORY_SOURCE_ "${CMAKE_CURRENT_BINARY_DIR}/src" ABSOLUTE)
55
get_filename_component(_BOOST_PREPROCESSOR_BR_OUTPUT_DIRECTORY_HEADER_ "${CMAKE_CURRENT_BINARY_DIR}/include" ABSOLUTE)
6-
set(BOOST_BUILTIN_RESOURCES_DIRECTORY_PATH "${_BOOST_PREPROCESSOR_BR_BUNDLE_SEARCH_DIRECTORY_}" CACHE INTERNAL "" FORCE)
6+
set(BOOST_BUILTIN_RESOURCES_DIRECTORY_PATH "${_BOOST_PREPROCESSOR_BR_BUNDLE_SEARCH_DIRECTORY_}/boost" CACHE INTERNAL "" FORCE)
77

88
if(NBL_EMBED_BUILTIN_RESOURCES)
99
include("${NBL_ROOT_PATH}/src/nbl/builtin/utils.cmake")
1010

11-
file(GLOB_RECURSE BOOST_HEADERS_REC_REL RELATIVE "${BOOST_PREPROCESSOR_INCLUDE}/boost" "${BOOST_PREPROCESSOR_INCLUDE}/*")
11+
file(GLOB_RECURSE BOOST_HEADERS_REC_REL RELATIVE "${BOOST_BUILTIN_RESOURCES_DIRECTORY_PATH}" "${BOOST_PREPROCESSOR_INCLUDE}/*")
1212

1313
foreach(BOOST_HEADER_REL IN LISTS BOOST_HEADERS_REC_REL)
1414
LIST_BUILTIN_RESOURCE(BOOST_RESOURCES_TO_EMBED "${BOOST_HEADER_REL}")
@@ -32,8 +32,9 @@ endforeach()
3232

3333
add_subdirectory(superproject/libs/wave EXCLUDE_FROM_ALL)
3434

35+
list(APPEND NBL_BOOST_TARGETS boost_wave) # wave
3536
foreach(BOOST_LIB IN LISTS NBL_BOOST_LIBS)
36-
if(TARGET boost_${BOOST_LIB})
37+
if(TARGET boost_${BOOST_LIB}) # wave's deps
3738
list(APPEND NBL_BOOST_TARGETS boost_${BOOST_LIB})
3839
endif()
3940
endforeach()

3rdparty/dxc/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ endif()
5454

5555
# perform DXC compile standard requirement test
5656
set(CMAKE_CXX_STANDARD_REQUIRED ON)
57+
# TODO: Don't they support a higher standard now, like 17 ?
5758
set(CMAKE_CXX_STANDARD 11) # compiler must support exactly c++11 or c++14 standard in order to be able to build DXC libraries
5859

5960
try_compile(DXC_COMPILE_TEST_PASSED
@@ -166,7 +167,7 @@ CACHE INTERNAL "" FORCE)
166167
get_filename_component(_SPIRV_BR_BUNDLE_SEARCH_DIRECTORY_ "${DXC_SPIRV_HEADERS_DIR}/include" ABSOLUTE)
167168
get_filename_component(_SPIRV_BR_OUTPUT_DIRECTORY_SOURCE_ "${CMAKE_CURRENT_BINARY_DIR}/src" ABSOLUTE)
168169
get_filename_component(_SPIRV_BR_OUTPUT_DIRECTORY_HEADER_ "${CMAKE_CURRENT_BINARY_DIR}/include" ABSOLUTE)
169-
set(DXC_BUILTIN_RESOURCES_DIRECTORY_PATH "${_SPIRV_BR_BUNDLE_SEARCH_DIRECTORY_}" CACHE INTERNAL "" FORCE)
170+
set(SPIRV_BUILTIN_RESOURCES_DIRECTORY_PATH "${_SPIRV_BR_BUNDLE_SEARCH_DIRECTORY_}/spirv" CACHE INTERNAL "" FORCE)
170171

171172
if(NBL_EMBED_BUILTIN_RESOURCES)
172173
include("${NBL_ROOT_PATH}/src/nbl/builtin/utils.cmake")
@@ -175,6 +176,6 @@ if(NBL_EMBED_BUILTIN_RESOURCES)
175176
LIST_BUILTIN_RESOURCE(SPIRV_RESOURCES_TO_EMBED "unified1/spirv.h")
176177
LIST_BUILTIN_RESOURCE(SPIRV_RESOURCES_TO_EMBED "unified1/spirv.hpp")
177178

178-
ADD_CUSTOM_BUILTIN_RESOURCES(dxcBuiltinResourceData SPIRV_RESOURCES_TO_EMBED "${_SPIRV_BR_BUNDLE_SEARCH_DIRECTORY_}" "spirv" "spirv::builtin" "${_SPIRV_BR_OUTPUT_DIRECTORY_HEADER_}" "${_SPIRV_BR_OUTPUT_DIRECTORY_SOURCE_}" "STATIC" "INTERNAL")
179+
ADD_CUSTOM_BUILTIN_RESOURCES(spirvBuiltinResourceData SPIRV_RESOURCES_TO_EMBED "${_SPIRV_BR_BUNDLE_SEARCH_DIRECTORY_}" "spirv" "spirv::builtin" "${_SPIRV_BR_OUTPUT_DIRECTORY_HEADER_}" "${_SPIRV_BR_OUTPUT_DIRECTORY_SOURCE_}" "STATIC" "INTERNAL")
179180
endif()
180181

3rdparty/dxc/dxc

Submodule dxc updated 1614 files

3rdparty/tcpp

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

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if(MSVC)
2222
if(NBL_SANITIZE_ADDRESS)
2323
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>")
2424
else()
25-
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>")
25+
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug>:EditAndContinue>$<$<CONFIG:RelWithDebInfo>:ProgramDatabase>")
2626
endif()
2727
endif()
2828

@@ -65,7 +65,7 @@ endif()
6565
get_filename_component(NBL_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
6666
get_filename_component(NBL_ROOT_PATH_BINARY "${CMAKE_CURRENT_BINARY_DIR}" ABSOLUTE)
6767
get_filename_component(NBL_PYTHON_MODULE_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/tests" ABSOLUTE)
68-
set(NBL_BUILTIN_RESOURCES_DIRECTORY_PATH "${NBL_ROOT_PATH}/include")
68+
set(NBL_BUILTIN_RESOURCES_DIRECTORY_PATH "${NBL_ROOT_PATH}/include/nbl/builtin")
6969
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${NBL_ROOT_PATH}/cmake" CACHE PATH "")
7070

7171
# Configure CCache if available
@@ -338,6 +338,8 @@ set(NBL_MEDIA_DIRECTORY "${PROJECT_SOURCE_DIR}/examples_tests/media")
338338
get_filename_component(NBL_MEDIA_DIRECTORY_ABS "${NBL_MEDIA_DIRECTORY}" ABSOLUTE)
339339

340340
option(NBL_UPDATE_GIT_SUBMODULE "Turn this ON to let CMake update all public submodules for you" ON)
341+
option(NBL_FORCE_ON_UPDATE_GIT_SUBMODULE "Submodules will be updated with --force flag if NBL_FORCE_UPDATE_GIT_SUBMODULE is turned ON, use with caution - if there are any uncommited files in submodules' working tree they will be removed!" OFF)
342+
option(NBL_SYNC_ON_UPDATE_GIT_SUBMODULE "Sync initialized submodule paths if NBL_FORCE_UPDATE_GIT_SUBMODULE is turned ON, this is useful when any submodule remote path got modified and you want to apply this modification to your local repository. Turning NBL_FORCE_ON_UPDATE_GIT_SUBMODULE implies this option" OFF)
341343
option(NBL_UPDATE_GIT_SUBMODULE_INCLUDE_PRIVATE "Turn this ON to attempt to update private Nabla submodules" OFF)
342344
option(NBL_CI_GIT_SUBMODULES_SHALLOW "" OFF)
343345

CMakePresets.json

Lines changed: 75 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,42 @@
55
"minor": 26,
66
"patch": 0
77
},
8-
8+
99
"configurePresets": [
1010
{
1111
"name": "ci-configure-dev",
12-
"hidden": true,
12+
"hidden": true,
1313
"description": "main CI configure preset for inheritance",
1414
"cacheVariables": {
15-
"NBL_CI_MODE": "ON",
16-
"NBL_CI_GIT_SUBMODULES_SHALLOW": "ON",
15+
"NBL_CI_MODE": "ON",
16+
"NBL_CI_GIT_SUBMODULES_SHALLOW": "ON",
1717
"NBL_UPDATE_GIT_SUBMODULE": "ON",
18-
"NBL_COMPILE_WITH_CUDA": "OFF",
19-
"NBL_BUILD_OPTIX": "OFF",
20-
"NBL_BUILD_MITSUBA_LOADER": "OFF",
21-
"NBL_BUILD_RADEON_RAYS": "OFF",
22-
"NBL_RUN_TESTS": "ON",
23-
"NBL_CPACK_CI": "ON",
24-
"_NBL_MEMORY_CONSUMPTION_CHECK_SKIP_": "ON"
18+
"NBL_COMPILE_WITH_CUDA": "OFF",
19+
"NBL_BUILD_OPTIX": "OFF",
20+
"NBL_BUILD_MITSUBA_LOADER": "OFF",
21+
"NBL_BUILD_RADEON_RAYS": "OFF",
22+
"_NBL_COMPILE_WITH_OPEN_EXR_": "ON",
23+
"NBL_RUN_TESTS": "ON",
24+
"NBL_CPACK_CI": "ON",
25+
"_NBL_MEMORY_CONSUMPTION_CHECK_SKIP_": "ON"
2526
}
2627
},
27-
{
28+
{
2829
"name": "ci-configure-static-dev",
29-
"hidden": true,
30+
"hidden": true,
3031
"description": "CI preset for static-configure inheritance",
3132
"inherits": "ci-configure-dev",
32-
"binaryDir": "${sourceDir}/build_static"
33+
"binaryDir": "${sourceDir}/build_static"
3334
},
34-
{
35+
{
3536
"name": "ci-configure-dynamic-dev",
36-
"hidden": true,
37+
"hidden": true,
3738
"description": "CI preset for dynamic-configure inheritance",
3839
"inherits": "ci-configure-dev",
39-
"binaryDir": "${sourceDir}/build_dynamic",
40-
"cacheVariables": {
40+
"binaryDir": "${sourceDir}/build_dynamic",
41+
"cacheVariables": {
4142
"NBL_STATIC_BUILD": "OFF",
42-
"NBL_DYNAMIC_MSVC_RUNTIME": "ON"
43+
"NBL_DYNAMIC_MSVC_RUNTIME": "ON"
4344
}
4445
},
4546
{
@@ -49,7 +50,7 @@
4950
"description": "CI static configure using Ninja Multi-Config generator, any OS as host",
5051
"generator": "Ninja Multi-Config"
5152
},
52-
{
53+
{
5354
"name": "ci-configure-dynamic-ninja-multi",
5455
"inherits": "ci-configure-dynamic-dev",
5556
"displayName": "CI configure-dynamic Ninja Multi-Config",
@@ -61,21 +62,21 @@
6162
"inherits": "ci-configure-static-dev",
6263
"displayName": "CI configure-static Visual Studio MSVC windows-host-only",
6364
"description": "CI static configure using Visual Studio generator and MSVC toolset, windows as host only",
64-
"generator": "Visual Studio 17 2022",
65-
"toolset": "v143",
65+
"generator": "Visual Studio 17 2022",
66+
"toolset": "v143",
6667
"condition": {
6768
"type": "equals",
6869
"lhs": "${hostSystemName}",
6970
"rhs": "Windows"
7071
}
7172
},
72-
{
73+
{
7374
"name": "ci-configure-dynamic-msvc",
7475
"inherits": "ci-configure-dynamic-dev",
7576
"displayName": "CI configure-dynamic Visual Studio MSVC windows-host-only",
7677
"description": "CI dynamic configure using Visual Studio generator and MSVC toolset, windows as host only",
77-
"toolset": "v143",
78-
"generator": "Visual Studio 17 2022",
78+
"toolset": "v143",
79+
"generator": "Visual Studio 17 2022",
7980
"condition": {
8081
"type": "equals",
8182
"lhs": "${hostSystemName}",
@@ -87,97 +88,97 @@
8788
{
8889
"name": "ci-build-dev",
8990
"configurePreset": "ci-configure-dev",
90-
"hidden": true,
91+
"hidden": true,
9192
"description": "main CI build preset for inheritance",
92-
"targets": [
93-
"Nabla"
94-
]
93+
"targets": [
94+
"Nabla"
95+
]
9596
},
96-
{
97+
{
9798
"name": "ci-build-static-dev",
9899
"configurePreset": "ci-configure-static-dev",
99-
"hidden": true,
100-
"description": "CI preset for static build inheritance",
100+
"hidden": true,
101+
"description": "CI preset for static build inheritance",
101102
"inherits": "ci-build-dev"
102103
},
103-
{
104+
{
104105
"name": "ci-build-dynamic-dev",
105106
"configurePreset": "ci-configure-dynamic-dev",
106-
"hidden": true,
107-
"description": "CI preset for dynamic-build inheritance",
107+
"hidden": true,
108+
"description": "CI preset for dynamic-build inheritance",
108109
"inherits": "ci-build-dev"
109110
},
110-
{
111+
{
111112
"name": "ci-build-static-ninja-multi",
112113
"configurePreset": "ci-configure-static-ninja-multi",
113-
"displayName": "CI build-static Ninja Multi-Config",
114-
"description": "CI static build using Ninja Multi-Config generator",
114+
"displayName": "CI build-static Ninja Multi-Config",
115+
"description": "CI static build using Ninja Multi-Config generator",
115116
"inherits": "ci-build-static-dev"
116117
},
117-
{
118+
{
118119
"name": "ci-build-dynamic-ninja-multi",
119120
"configurePreset": "ci-configure-dynamic-ninja-multi",
120-
"displayName": "CI build-dynamic Ninja Multi-Config",
121-
"description": "CI dynamic build using Ninja Multi-Config generator",
121+
"displayName": "CI build-dynamic Ninja Multi-Config",
122+
"description": "CI dynamic build using Ninja Multi-Config generator",
122123
"inherits": "ci-build-dynamic-dev"
123124
},
124-
{
125+
{
125126
"name": "ci-build-static-msvc",
126127
"configurePreset": "ci-configure-static-msvc",
127-
"displayName": "CI build-dynamic Visual Studio MSVC windows-host-only",
128-
"description": "CI dynamic build using Visual Studio generator and MSVC toolset, windows as host only",
128+
"displayName": "CI build-dynamic Visual Studio MSVC windows-host-only",
129+
"description": "CI dynamic build using Visual Studio generator and MSVC toolset, windows as host only",
129130
"inherits": "ci-build-static-dev"
130131
},
131-
{
132+
{
132133
"name": "ci-build-dynamic-msvc",
133134
"configurePreset": "ci-configure-dynamic-msvc",
134-
"displayName": "CI build-dynamic Visual Studio MSVC windows-host-only",
135-
"description": "CI dynamic build using Visual Studio generator and MSVC toolset, windows as host only",
135+
"displayName": "CI build-dynamic Visual Studio MSVC windows-host-only",
136+
"description": "CI dynamic build using Visual Studio generator and MSVC toolset, windows as host only",
136137
"inherits": "ci-build-dynamic-dev"
137138
}
138139
],
139140
"packagePresets": [
140141
{
141142
"name": "ci-package-dev",
142-
"hidden": true
143+
"hidden": true
143144
},
144-
{
145+
{
145146
"name": "ci-package-static-dev",
146-
"hidden": true,
147-
"inherits": "ci-package-dev"
147+
"hidden": true,
148+
"inherits": "ci-package-dev"
148149
},
149-
{
150+
{
150151
"name": "ci-package-dynamic-dev",
151-
"hidden": true,
152-
"inherits": "ci-package-dev"
152+
"hidden": true,
153+
"inherits": "ci-package-dev"
153154
},
154-
{
155+
{
155156
"name": "ci-package-static-ninja-multi",
156-
"inherits": "ci-package-static-dev",
157-
"configurePreset": "ci-configure-static-ninja-multi",
158-
"displayName": "CI package-static Ninja Multi-Config",
159-
"description": "CI static package using Ninja Multi-Config generator"
157+
"inherits": "ci-package-static-dev",
158+
"configurePreset": "ci-configure-static-ninja-multi",
159+
"displayName": "CI package-static Ninja Multi-Config",
160+
"description": "CI static package using Ninja Multi-Config generator"
160161
},
161-
{
162+
{
162163
"name": "ci-package-dynamic-ninja-multi",
163-
"inherits": "ci-package-dynamic-dev",
164-
"configurePreset": "ci-configure-dynamic-ninja-multi",
165-
"displayName": "CI package-dynamic Ninja Multi-Config",
166-
"description": "CI dynamic package using Ninja Multi-Config generator"
164+
"inherits": "ci-package-dynamic-dev",
165+
"configurePreset": "ci-configure-dynamic-ninja-multi",
166+
"displayName": "CI package-dynamic Ninja Multi-Config",
167+
"description": "CI dynamic package using Ninja Multi-Config generator"
167168
},
168-
{
169+
{
169170
"name": "ci-package-static-msvc",
170-
"inherits": "ci-package-static-dev",
171-
"configurePreset": "ci-configure-static-msvc",
172-
"displayName": "CI package-static Visual Studio MSVC windows-host-only",
173-
"description": "CI static package using Visual Studio generator and MSVC toolset, windows as host only"
171+
"inherits": "ci-package-static-dev",
172+
"configurePreset": "ci-configure-static-msvc",
173+
"displayName": "CI package-static Visual Studio MSVC windows-host-only",
174+
"description": "CI static package using Visual Studio generator and MSVC toolset, windows as host only"
174175
},
175-
{
176+
{
176177
"name": "ci-package-dynamic-msvc",
177-
"inherits": "ci-package-dynamic-dev",
178-
"configurePreset": "ci-configure-dynamic-msvc",
179-
"displayName": "CI package-dynamic Visual Studio MSVC windows-host-only",
180-
"description": "CI dynamic package using Visual Studio generator and MSVC toolset, windows as host only"
178+
"inherits": "ci-package-dynamic-dev",
179+
"configurePreset": "ci-configure-dynamic-msvc",
180+
"displayName": "CI package-dynamic Visual Studio MSVC windows-host-only",
181+
"description": "CI dynamic package using Visual Studio generator and MSVC toolset, windows as host only"
181182
}
182183
]
183184
}

0 commit comments

Comments
 (0)