Skip to content

Commit 0feb4e9

Browse files
author
kevyuu
committed
Merge branch 'master' into smooth_normal_calculation
2 parents 5acb40d + aa5d6cb commit 0feb4e9

File tree

184 files changed

+12847
-3279
lines changed

Some content is hidden

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

184 files changed

+12847
-3279
lines changed

.gitconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[alias]
2+
devsh = "!f() { git -c submodule.ci.update=checkout -c submodule.Ditt-Reference-Scenes.update=checkout \"$@\"; }; f"

.github/workflows/build-nabla.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,3 +345,44 @@ jobs:
345345
346346
$token = '${{ secrets.CE_IMAGE_UPDATE_TOKEN }}'
347347
Invoke-UpdateImages -Token $token
348+
349+
smoke-tests:
350+
name: Nabla / Smoke (${{ matrix.os }}, ${{ matrix.vendor }}-latest, ${{ matrix.config }})
351+
needs: build-windows
352+
runs-on: windows-2022
353+
strategy:
354+
fail-fast: false
355+
matrix:
356+
config: [Release, Debug, RelWithDebInfo]
357+
os: [windows-2022]
358+
vendor: [msvc]
359+
steps:
360+
- name: Checkout smoke
361+
uses: actions/checkout@v4
362+
with:
363+
fetch-depth: 1
364+
sparse-checkout: |
365+
smoke
366+
367+
- name: Download Nabla install artifact
368+
uses: actions/download-artifact@v4
369+
with:
370+
name: run-windows-17.13.6-msvc-${{ matrix.config }}-install
371+
path: smoke
372+
373+
- name: Unpack Nabla install artifact
374+
run: |
375+
$tar = Get-ChildItem smoke -Filter *-install.tar -File | Select-Object -First 1
376+
if (-not $tar) { throw "install tar not found in smoke" }
377+
tar -xf $tar.FullName -C smoke
378+
if (-not (Test-Path "smoke/build-ct/install")) { throw "smoke/build-ct/install not found" }
379+
tree.com smoke /F
380+
381+
- name: Configure Smoke
382+
run: cmake -S smoke -B smoke/out
383+
384+
- name: Build Smoke
385+
run: cmake --build smoke/out --config ${{ matrix.config }}
386+
387+
- name: CTest Smoke
388+
run: ctest --test-dir smoke/out --force-new-ctest-process --output-on-failure --no-tests=error -C ${{ matrix.config }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# usually where people build
1717
android_build/*
1818
build*/*
19+
smoke/*build*/*
1920
# default install paths
2021
install/*
2122
# legacy temporary and output directories
@@ -36,3 +37,4 @@ tools/nsc/bin/*
3637
*/__pycache__/*
3738
__pycache__/*
3839
*.pyc
40+

.gitmodules

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,8 @@
121121
[submodule "3rdparty/gtl"]
122122
path = 3rdparty/gtl
123123
url = https://github.com/greg7mdp/gtl.git
124+
[submodule "ci"]
125+
path = ci
126+
url = git@github.com:Devsh-Graphics-Programming/Nabla-CI.git
127+
branch = ditt
128+
update = none

3rdparty/CMakeLists.txt

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,9 @@ option(GIT_EXCLUDE_IS_DIRTY "Exclude IS_DIRTY from git tracking checks, will inc
292292
add_subdirectory(git-version-tracking EXCLUDE_FROM_ALL)
293293
NBL_ADD_GIT_TRACKING_META_LIBRARY(nabla "${NBL_ROOT_PATH}")
294294
NBL_ADD_GIT_TRACKING_META_LIBRARY(dxc "${CMAKE_CURRENT_SOURCE_DIR}/dxc/dxc")
295+
nbl_install_file("${CMAKE_CURRENT_BINARY_DIR}/git-version-tracking/nabla_git_info.json")
296+
nbl_install_file("${CMAKE_CURRENT_BINARY_DIR}/git-version-tracking/dxc_git_info.json")
297+
295298
NBL_GENERATE_GIT_TRACKING_META()
296299

297300
# NGFX
@@ -522,7 +525,27 @@ add_dependencies(3rdparty ${NBL_3RDPARTY_TARGETS})
522525

523526
NBL_ADJUST_FOLDERS(3rdaprty)
524527

525-
nbl_install_dir("${CMAKE_CURRENT_SOURCE_DIR}/gtl/include")
528+
nbl_install_dir(Vulkan-Headers/include/vulkan)
529+
nbl_install_dir(Vulkan-Headers/include/vk_video)
530+
531+
nbl_install_file_spec(volk/volk.h volk)
532+
533+
nbl_install_dir(gtl/include/gtl)
534+
nbl_install_dir(glm/glm)
535+
536+
nbl_install_file_spec(${CMAKE_CURRENT_BINARY_DIR}/imath/config/ImathConfig.h imath)
537+
nbl_install_dir(imath/src/Imath)
538+
539+
nbl_install_file(blake/c/blake3.h)
540+
541+
nbl_install_file_spec(nlohmann_json/include/nlohmann/json_fwd.hpp nlohmann)
542+
nbl_install_file_spec(nlohmann_json/include/nlohmann/detail/abi_macros.hpp nlohmann/detail)
543+
544+
nbl_install_dir(boost/superproject/libs/preprocessor/include/boost)
545+
546+
nbl_install_file_spec(renderdoc/renderdoc_app.h renderdoc)
547+
548+
nbl_install_file(${CMAKE_CURRENT_BINARY_DIR}/git-version-tracking/git_info.h)
526549

527550
# parent scope exports, must be at the end of the file
528551
set(_NBL_3RDPARTY_TARGETS_

3rdparty/dxc/dxc

Submodule dxc updated 142 files

CMakeLists.txt

Lines changed: 52 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,25 @@ NBL_POLICY(CMP0112 NEW) # https://cmake.org/cmake/help/latest/policy/CMP0112.htm
2020
NBL_POLICY(CMP0141 NEW) # https://cmake.org/cmake/help/latest/policy/CMP0141.html#policy:CMP0141
2121
NBL_POLICY(CMP0118 NEW) # https://cmake.org/cmake/help/latest/policy/CMP0118.html#policy:CMP0118
2222

23+
set(CMAKE_CXX_SCAN_FOR_MODULES OFF) # https://cmake.org/cmake/help/latest/prop_tgt/CXX_SCAN_FOR_MODULES.html#prop_tgt:CXX_SCAN_FOR_MODULES
24+
2325
set(NBL_BUILD_ANDROID OFF)
2426

2527
include(ExternalProject)
2628
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/toolchains/android/build.cmake)
2729

28-
project(Nabla LANGUAGES CXX C)
30+
project(Nabla
31+
VERSION 0.8.0.1
32+
HOMEPAGE_URL "https://www.devsh.eu/nabla"
33+
LANGUAGES CXX C
34+
)
2935
enable_language(C CXX ASM ASM_NASM)
3036

37+
include(GNUInstallDirs)
38+
include(CMakePackageConfigHelpers)
39+
3140
if(MSVC)
3241
enable_language(ASM_MASM)
33-
link_libraries(delayimp)
3442
endif()
3543

3644
# TODO: TO BE KILLED, keep both in one tree
@@ -154,31 +162,16 @@ if(_NBL_AVAILABLE_PHYSICAL_MEMORY_ LESS_EQUAL _NBL_DEBUG_MEMORY_CONSUPTION_WITH_
154162
else()
155163
set(_NBL_CMAKE_STATUS_ FATAL_ERROR)
156164
endif()
157-
165+
158166
message(${_NBL_CMAKE_STATUS_} "Memory consumption issue detected! To protect you from compile and linker errors, please read this message.\n\nYour total physical memory is ${_NBL_TOTAL_PHYSICAL_MEMORY_} MBs, your OS is currently using ${_NBL_CURRENTLY_USED_PHYSICAL_MEMORY_} MBs and consumption of your memory with requested ${_NBL_JOBS_AMOUNT_} jobs in Debug configuration may be around ${_NBL_DEBUG_MEMORY_CONSUPTION_WITH_ALL_JOBS_} MBs. Please override '_NBL_JOBS_AMOUNT_' variable by setting it as cache variable and lower the jobs! If you want to continue anyway, please define 'NBL_MEMORY_CONSUMPTION_CHECK_SKIP' but be aware - you are doing it on your own risk of possible build failures.")
159167
endif()
160168

161169
include(adjust/flags)
162170
include(adjust/definitions)
163171

164-
if(WIN32)
165-
set(_NBL_PLATFORM_WINDOWS_ 1)
166-
elseif(ANDROID)
167-
set(_NBL_PLATFORM_ANDROID_ 1)
168-
elseif(UNIX)
169-
set(_NBL_PLATFORM_LINUX_ 1)
170-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1")
171-
endif()
172-
173-
if(NBL_STATIC_BUILD)
174-
unset(_NBL_SHARED_BUILD_ CACHE)
175-
else()
176-
set(_NBL_SHARED_BUILD_ ON CACHE INTERNAL "")
177-
endif()
178-
179172
option(NBL_BUILD_DPL "Enable DPL (Dynamic Parallelism Library)" OFF)
180173
option(NBL_PCH "Enable pre-compiled header" ON)
181-
option(NBL_FAST_MATH "Enable fast low-precision math" ON)
174+
option(NBL_FAST_MATH "Enable fast low-precision math" OFF) # the reason OFF is by default now is the var controling it at build time was set AFTER BuildConfigOptions was generated - resulting in the feature being always OFF regardless the value xD - so just for sanity, keeping the same behaviour by default
182175
option(NBL_BUILD_EXAMPLES "Enable building examples" ON)
183176
option(NBL_BUILD_MITSUBA_LOADER "Enable nbl::ext::MitsubaLoader?" OFF) # TODO: once it compies turn this ON by default!
184177
option(NBL_BUILD_IMGUI "Enable nbl::ext::ImGui?" ON)
@@ -286,4 +279,43 @@ option(NBL_CPACK_INCLUDE_EXAMPLES "CPack with examples and media" ON)
286279
include(cpack/package)
287280
include(build/info)
288281
export(TARGETS ${_NBL_3RDPARTY_TARGETS_} Nabla NAMESPACE Nabla:: APPEND FILE ${NBL_ROOT_PATH_BINARY}/NablaExport.cmake)
289-
NBL_ADJUST_FOLDERS(nabla)
282+
283+
option(NBL_ENABLE_CONFIG_INSTALL "Install Relocatable NablaConfig.cmake and NablaConfigVersion.cmake scripts" ON)
284+
285+
if(NBL_ENABLE_CONFIG_INSTALL)
286+
if(NBL_STATIC_BUILD)
287+
message(WARNING "Ignoring NBL_ENABLE_CONFIG_INSTALL due to: TODO, static builds are not relocatable yet!")
288+
else()
289+
install(TARGETS Nabla
290+
EXPORT NablaExportTargets
291+
ARCHIVE DESTINATION ${_NBL_CPACK_PACKAGE_RELATIVE_ENTRY_}/lib
292+
LIBRARY DESTINATION ${_NBL_CPACK_PACKAGE_RELATIVE_ENTRY_}/lib
293+
RUNTIME DESTINATION ${_NBL_CPACK_PACKAGE_RELATIVE_ENTRY_}/runtime/nbl
294+
)
295+
296+
write_basic_package_version_file(
297+
"${CMAKE_CURRENT_BINARY_DIR}/NablaConfigVersion.cmake"
298+
VERSION ${PROJECT_VERSION}
299+
COMPATIBILITY SameMinorVersion
300+
)
301+
302+
configure_package_config_file(
303+
"${CMAKE_CURRENT_LIST_DIR}/cmake/NablaConfig.cmake.in"
304+
"${CMAKE_CURRENT_BINARY_DIR}/NablaConfig.cmake"
305+
INSTALL_DESTINATION cmake
306+
)
307+
308+
install(EXPORT NablaExportTargets
309+
NAMESPACE Nabla::
310+
DESTINATION cmake
311+
)
312+
313+
install(FILES
314+
"${CMAKE_CURRENT_BINARY_DIR}/NablaConfig.cmake"
315+
"${CMAKE_CURRENT_BINARY_DIR}/NablaConfigVersion.cmake"
316+
DESTINATION cmake
317+
)
318+
endif()
319+
endif()
320+
321+
NBL_ADJUST_FOLDERS(nabla)

artifacts/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ add_custom_target(pack_artifact_ditt
1010
COMMAND cmake -E echo "Archiving the build!"
1111
COMMAND cmake -E copy ${EXAMPLES_TESTS_PATH}/${NBL_RAYTRACEDAO_EX_NAME}/bin/LowDiscrepancySequenceCache.bin ${CMAKE_CURRENT_BINARY_DIR}/Ditt/pack/${NBL_RAYTRACEDAO_EX_NAME}/bin/LowDiscrepancySequenceCache.bin
1212
COMMAND cmake -E copy ${EXAMPLES_TESTS_PATH}/${NBL_RAYTRACEDAO_EX_NAME}/bin/raytracedao.exe ${CMAKE_CURRENT_BINARY_DIR}/Ditt/pack/${NBL_RAYTRACEDAO_EX_NAME}/bin/raytracedao.exe
13+
COMMAND cmake -E copy ${EXAMPLES_TESTS_PATH}/${NBL_RAYTRACEDAO_EX_NAME}/addEnvironmentEmitters.comp ${CMAKE_CURRENT_BINARY_DIR}/Ditt/pack/${NBL_RAYTRACEDAO_EX_NAME}/addEnvironmentEmitters.comp
1314
COMMAND cmake -E copy ${EXAMPLES_TESTS_PATH}/${NBL_RAYTRACEDAO_EX_NAME}/closestHit.comp ${CMAKE_CURRENT_BINARY_DIR}/Ditt/pack/${NBL_RAYTRACEDAO_EX_NAME}/closestHit.comp
1415
COMMAND cmake -E copy ${EXAMPLES_TESTS_PATH}/${NBL_RAYTRACEDAO_EX_NAME}/common.h ${CMAKE_CURRENT_BINARY_DIR}/Ditt/pack/${NBL_RAYTRACEDAO_EX_NAME}/common.h
1516
COMMAND cmake -E copy ${EXAMPLES_TESTS_PATH}/${NBL_RAYTRACEDAO_EX_NAME}/cull.comp ${CMAKE_CURRENT_BINARY_DIR}/Ditt/pack/${NBL_RAYTRACEDAO_EX_NAME}/cull.comp

ci

Submodule ci added at 043f8a0

0 commit comments

Comments
 (0)