Skip to content

Commit

Permalink
Falcor 6.0 (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
skallweitNV authored Jul 3, 2023
1 parent 258a214 commit 3f30b44
Show file tree
Hide file tree
Showing 447 changed files with 7,136 additions and 3,353 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ set(FALCOR_USE_SYSTEM_PYTHON OFF CACHE BOOL "Use system Python distribution")
set(FALCOR_ENABLE_USD ON CACHE BOOL "Enable USD")


# Enable/disable Address Sanitizer.
set(FALCOR_ENABLE_ASAN OFF CACHE BOOL "Enable Address Sanitizer")

# Header validation.
# If enabled, additional targets are generated to validate that headers are self sufficient.
set(FALCOR_VALIDATE_HEADERS OFF CACHE BOOL "Enable header validation")
Expand Down Expand Up @@ -200,6 +203,7 @@ add_subdirectory(external)
message(STATUS "Feature flags:")
message(STATUS "FALCOR_HAS_D3D12: ${FALCOR_HAS_D3D12}")
message(STATUS "FALCOR_HAS_VULKAN: ${FALCOR_HAS_VULKAN}")
message(STATUS "FALCOR_HAS_AFTERMATH: ${FALCOR_HAS_AFTERMATH}")
message(STATUS "FALCOR_HAS_NVAPI: ${FALCOR_HAS_NVAPI}")
message(STATUS "FALCOR_HAS_PIX: ${FALCOR_HAS_PIX}")
message(STATUS "FALCOR_HAS_CUDA: ${FALCOR_HAS_CUDA}")
Expand Down Expand Up @@ -451,7 +455,7 @@ if(plugin_targets)
endif()

# Generate settings.toml file.
file(GENERATE OUTPUT ${FALCOR_OUTPUT_DIRECTORY}/settings.json CONTENT "{ \"standardsearchpath\" : { \"media\" : \"\${FALCOR_MEDIA_FOLDERS}\"}}")
file(GENERATE OUTPUT ${FALCOR_OUTPUT_DIRECTORY}/settings.json CONTENT "{ \"standardsearchpath\" : { \"media\" : \"\${FALCOR_MEDIA_FOLDERS}\", \"mdl\" : \"\${FALCOR_MDL_PATHS}\" }}")

# Make Mogwai and FalcorPython depend on all plugins.
if(plugin_targets)
Expand Down
50 changes: 41 additions & 9 deletions Source/Falcor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ target_sources(Falcor PRIVATE
GlobalState.h

Core/Assert.h
Core/Enum.h
Core/ErrorHandling.cpp
Core/ErrorHandling.h
Core/Errors.cpp
Expand All @@ -31,14 +32,15 @@ target_sources(Falcor PRIVATE
Core/Window.cpp
Core/Window.h

Core/API/Aftermath.h
Core/API/Aftermath.cpp
Core/API/BlendState.cpp
Core/API/BlendState.h
Core/API/BlitContext.cpp
Core/API/BlitContext.h
Core/API/BlitReduction.3d.slang
Core/API/Buffer.cpp
Core/API/Buffer.h
Core/API/Common.cpp
Core/API/Common.h
Core/API/ComputeContext.cpp
Core/API/ComputeContext.h
Expand Down Expand Up @@ -94,10 +96,9 @@ target_sources(Falcor PRIVATE
Core/API/RtStateObject.h
Core/API/Sampler.cpp
Core/API/Sampler.h
Core/API/Shader.cpp
Core/API/Shader.h
Core/API/ShaderResourceType.h
Core/API/ShaderTable.h
Core/API/ShaderType.h
Core/API/Swapchain.cpp
Core/API/Swapchain.h
Core/API/Texture.cpp
Expand Down Expand Up @@ -133,6 +134,7 @@ target_sources(Falcor PRIVATE

Core/Program/ComputeProgram.cpp
Core/Program/ComputeProgram.h
Core/Program/DefineList.h
Core/Program/GraphicsProgram.cpp
Core/Program/GraphicsProgram.h
Core/Program/Program.cpp
Expand Down Expand Up @@ -247,7 +249,6 @@ target_sources(Falcor PRIVATE
Rendering/Materials/StandardMaterialInstance.slang
Rendering/Materials/StandardMaterial.slang
Rendering/Materials/TexLODHelpers.slang
Rendering/Materials/TexLODTypes.cpp
Rendering/Materials/TexLODTypes.slang

Rendering/Materials/PBRT/PBRTDiffuseMaterial.slang
Expand Down Expand Up @@ -534,6 +535,8 @@ target_sources(Falcor PRIVATE
Utils/ObjectIDPython.h
Utils/PathResolving.cpp
Utils/PathResolving.h
Utils/Properties.cpp
Utils/Properties.h
Utils/Settings.cpp
Utils/Settings.h
Utils/SharedCache.h
Expand Down Expand Up @@ -666,9 +669,9 @@ target_sources(Falcor PRIVATE

Utils/Scripting/Console.cpp
Utils/Scripting/Console.h
Utils/Scripting/Dictionary.h
Utils/Scripting/ndarray.cpp
Utils/Scripting/ndarray.h
Utils/Scripting/PythonDictionary.h
Utils/Scripting/ScriptBindings.cpp
Utils/Scripting/ScriptBindings.h
Utils/Scripting/Scripting.cpp
Expand Down Expand Up @@ -830,16 +833,43 @@ target_compile_options(Falcor
-Wno-literal-suffix
-Wno-class-memaccess
-Wno-strict-aliasing
-Wno-maybe-uninitialized
-Wno-stringop-truncation
>
PRIVATE
$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/bigobj> # big object files
)

if(FALCOR_ENABLE_ASAN)
target_compile_options(Falcor
PUBLIC
$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:
/fsanitize=address
>
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:
-fsanitize=address
>
)
target_link_options(Falcor
PUBLIC
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:
-fsanitize=address
>
)
target_compile_definitions(Falcor
PUBLIC
$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:
_DISABLE_VECTOR_ANNOTATION
_DISABLE_STRING_ANNOTATION
>
)
endif()

if(FALCOR_PRECOMPILED_HEADERS)
target_precompile_headers(Falcor
PRIVATE
Falcor.h
)
target_precompile_headers(Falcor
PRIVATE
Falcor.h
)
endif()

target_link_options(Falcor
Expand All @@ -865,6 +895,7 @@ target_compile_definitions(Falcor
# Falcor feature flags.
FALCOR_HAS_D3D12=$<BOOL:${FALCOR_HAS_D3D12}>
FALCOR_HAS_VULKAN=$<BOOL:${FALCOR_HAS_VULKAN}>
FALCOR_HAS_AFTERMATH=$<BOOL:${FALCOR_HAS_AFTERMATH}>
FALCOR_HAS_NVAPI=$<BOOL:${FALCOR_HAS_NVAPI}>
FALCOR_HAS_CUDA=$<BOOL:${FALCOR_HAS_CUDA}>
FALCOR_HAS_D3D12_AGILITY_SDK=$<BOOL:${FALCOR_HAS_D3D12_AGILITY_SDK}>
Expand Down Expand Up @@ -902,6 +933,7 @@ target_link_libraries(Falcor
glfw mikktspace nvtt
$<$<BOOL:${FALCOR_HAS_D3D12}>:d3d12>
$<$<BOOL:${FALCOR_HAS_D3D12_AGILITY_SDK}>:agility-sdk>
$<$<BOOL:${FALCOR_HAS_AFTERMATH}>:aftermath>
$<$<BOOL:${FALCOR_HAS_NVAPI}>:nvapi>
# Windows system libraries.
$<$<PLATFORM_ID:Windows>:shcore.lib>
Expand Down
Loading

0 comments on commit 3f30b44

Please sign in to comment.