Skip to content

Commit

Permalink
MDL SDK 2019.1.4 (317500.5028)
Browse files Browse the repository at this point in the history
  • Loading branch information
lkettnerNV committed Sep 26, 2019
1 parent 3e6182b commit 5b1ab6f
Show file tree
Hide file tree
Showing 158 changed files with 13,179 additions and 5,879 deletions.
72 changes: 72 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,78 @@
Change Log
==========

MDL SDK 2019.1.4 (317500.5028): 27 Aug 2019
-----------------------------------------------

ABI compatible with the MDL SDK 2019.1.4 (317500.5028) binary release
(see [https://developer.nvidia.com/mdl-sdk](https://developer.nvidia.com/mdl-sdk))

**Added and Changed Features**

- General

- A new function `mi::neuraylib::IValue_texture::get_gamma()` has been added.
- The following new functions have been added to the target code generation:
- `mi::neuraylib::ITarget_code::execute_bsdf_auxiliary()`
- `mi::neuraylib::ITarget_code::execute_edf_auxiliary()`
- A new function `mi::neuraylib::ICompiled_material::get_surface_opacity()`
has been added.

- MDL Compiler and Backends

- Code generation for auxiliary methods has been added on distribution
functions for potential use in AI-denoising.
- The spectral color constructor `color(float[<N>],float[N])`,
`math::emission_color()`, and `math::blackboby()` are now supported in the
JIT backend.
- More optimizations regarding elemental constructors in the DAG
representation have been implemented.
- Map XOR operators on Boolean values to NOT-EQUAL in the HLSL backend to be
compatible to the SLANG compiler.

- MDL SDK examples

- The example programs `example_dxr` and `example_df_cuda` have been extended
to illustrate the use of auxiliary functions.
- A modified version of `example_dxr` has been added to illustrate the usage
of MDL in a multi-threaded context.
- Camera controls have been improved and new options have been added to
the example program `example_dxr`.

**Fixed Bugs**

- General

- The export of MDLE files from in-memory MDL modules has been fixed.

- MDL Compiler and Backends

- Temporary exponential creation of DAG nodes when using derivatives has
been fixed.
- Code generation of parameters reused multiple times in a derivative context
has been fixed.
- Relative imports including "." and ".." have been fixed.
- Duplicate global variables in generated HLSL code have been fixed.
- Invalid code generation for HLSL for special materials has been fixed.
- Indeterministic rare compilation errors regarding unknown functions have
been fixed.
- Indeterministic rare hangs during compilation with multiple threads have
been fixed.
- Under rare condition the code cache could return HLSL code instead of PTX
and vice versa. This has been fixed.
- The code cache that was not working under several conditions has been fixed.
- The handling of the `?:` operator on arrays inside the DAG representation
has been fixed such that it computes the right name now.
- The handling of unresolved resource paths in the target code has been fixed.
Previously all resources were mapped to index 1.
- A crash in the code generator when handling uniform matrix expressions with
automatic derivatives enabled has been fixed.
- A crash in the HLSL code generator for non-default optimization levels has
been fixed.
- A crash when adding distribution functions to a link unit after adding non-
distribution functions has been fixed.


MDL SDK 2019.1.1 (317500.2554): 08 Jun 2019
-----------------------------------------------

Expand Down
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ endif()
# enable tests if available
if(MDL_ENABLE_TESTS)
enable_testing()
if(MDL_LOG_PLATFORM_INFOS)
MESSAGE(STATUS "[INFO] MDL_ENABLE_TESTS: " ${MDL_ENABLE_TESTS})
endif()
endif()

# -------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -120,6 +117,7 @@ add_subdirectory(${MDL_SRC_FOLDER}/mdl/codegenerators/generator_dag)
add_subdirectory(${MDL_SRC_FOLDER}/mdl/compiler/compilercore)
add_subdirectory(${MDL_SRC_FOLDER}/mdl/compiler/compiler_hlsl)
add_subdirectory(${MDL_SRC_FOLDER}/mdl/jit/libbsdf)
add_subdirectory(${MDL_SRC_FOLDER}/mdl/jit/libmdlrt)
add_subdirectory(${MDL_SRC_FOLDER}/mdl/jit/devlib)
add_subdirectory(${MDL_SRC_FOLDER}/mdl/jit/generator_jit)
add_subdirectory(${MDL_SRC_FOLDER}/mdl/no_glsl/generator_stub)
Expand Down
4 changes: 4 additions & 0 deletions cmake/setup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ else()
set(MDL_ENABLE_TESTS OFF CACHE INTERNAL "Generates unit and example tests." FORCE)
endif()

# list of tests that can be defined only after all other targets are setup (clear that list here)
set(MDL_TEST_LIST_POST "" CACHE INTERNAL "list of test directories to add after regular targets are defined")

include(${MDL_BASE_FOLDER}/cmake/find/find_cuda_ext.cmake)
find_cuda_ext()

Expand Down Expand Up @@ -185,4 +188,5 @@ if(MDL_LOG_PLATFORM_INFOS)
MESSAGE(STATUS "[INFO] MDL_ENABLE_CUDA_EXAMPLES: " ${MDL_ENABLE_CUDA_EXAMPLES})
MESSAGE(STATUS "[INFO] MDL_ENABLE_D3D12_EXAMPLES: " ${MDL_ENABLE_D3D12_EXAMPLES})
MESSAGE(STATUS "[INFO] MDL_ENABLE_QT_EXAMPLES: " ${MDL_ENABLE_QT_EXAMPLES})
MESSAGE(STATUS "[INFO] MDL_ENABLE_TESTS: " ${MDL_ENABLE_TESTS})
endif()
45 changes: 29 additions & 16 deletions cmake/utilities.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function(TARGET_BUILD_SETUP)
${MDL_ADDITIONAL_COMPILER_DEFINES} # additional user defines
)


target_compile_options(${TARGET_BUILD_SETUP_TARGET}
PRIVATE
${MDL_ADDITIONAL_COMPILER_OPTIONS} # additional user options
Expand Down Expand Up @@ -203,8 +204,12 @@ function(SETUP_IDE_FOLDERS)
endif()

# relative files outside the current target
if(${_SOURCE} MATCHES "^../.*")
source_group("" FILES ${_SOURCE})
string(SUBSTRING ${_SOURCE} 0 3 _SOURCE_FIRST_3_CHARS)
if(_SOURCE_FIRST_3_CHARS STREQUAL "../")
get_filename_component(_FOLDER ${_SOURCE} DIRECTORY)
string(REPLACE "/" "\\" _FOLDER ${_FOLDER})
string(REPLACE "..\\" "" _FOLDER ${_FOLDER}) # drop leading points (could be replaced by "../", too)
source_group(${_FOLDER} FILES ${_SOURCE})
continue()
endif()

Expand All @@ -222,12 +227,13 @@ endfunction()

function(SETUP_IDE)
set(options)
set(oneValueArgs TARGET)
set(oneValueArgs TARGET VS_PROJECT_NAME)
set(multiValueArgs SOURCES)
cmake_parse_arguments(SETUP_IDE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
# provides the following variables:
# - SETUP_IDE_TARGET
# - SETUP_IDE_SOURCES
# - SETUP_IDE_VS_PROJECT_NAME

# not required without visual studio or xcode
if(NOT MSVC AND NOT MSVC_IDE)
Expand All @@ -246,9 +252,13 @@ function(SETUP_IDE)
get_filename_component(FOLDER_NAME ${FOLDER_PATH} NAME) # last folder is used as project name
get_filename_component(FOLDER_PATH ${FOLDER_PATH} PATH) # drop the last folder (equals the project name)

if (SETUP_IDE_VS_PROJECT_NAME AND NOT (SETUP_IDE_VS_PROJECT_NAME STREQUAL ""))
set(FOLDER_NAME ${SETUP_IDE_VS_PROJECT_NAME})
endif()

set_target_properties(${SETUP_IDE_TARGET} PROPERTIES
VS_DEBUGGER_WORKING_DIRECTORY "$(OutDir)" # working directory
PROJECT_LABEL ${FOLDER_NAME} # project name
VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/$(Configuration) # working directory
PROJECT_LABEL ${FOLDER_NAME} # project name
MAP_IMPORTED_CONFIG_DEBUG Debug
MAP_IMPORTED_CONFIG_RELEASE Release
MAP_IMPORTED_CONFIG_MINSIZEREL Release
Expand Down Expand Up @@ -559,7 +569,7 @@ endfunction()
#
function(CREATE_FROM_BASE_PRESET)
set(options WIN32)
set(oneValueArgs TARGET VERSION TYPE NAMESPACE OUTPUT_NAME EMBED_RC)
set(oneValueArgs TARGET VERSION TYPE NAMESPACE OUTPUT_NAME VS_PROJECT_NAME EMBED_RC)
set(multiValueArgs SOURCES ADDITIONAL_INCLUDE_DIRS)
cmake_parse_arguments(CREATE_FROM_BASE_PRESET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )

Expand Down Expand Up @@ -652,7 +662,8 @@ function(CREATE_FROM_BASE_PRESET)

# configure visual studio and maybe other IDEs
setup_ide(TARGET ${CREATE_FROM_BASE_PRESET_TARGET}
SOURCES ${CREATE_FROM_BASE_PRESET_SOURCES})
SOURCES ${CREATE_FROM_BASE_PRESET_SOURCES}
VS_PROJECT_NAME ${CREATE_FROM_BASE_PRESET_VS_PROJECT_NAME})

endfunction()

Expand Down Expand Up @@ -781,7 +792,7 @@ endfunction()
#
function(TARGET_ADD_CONTENT)
set(options)
set(oneValueArgs TARGET)
set(oneValueArgs TARGET FILE_BASE)
set(multiValueArgs FILES)
cmake_parse_arguments(TARGET_ADD_CONTENT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )

Expand All @@ -793,25 +804,29 @@ function(TARGET_ADD_CONTENT)
endif()

# add to project
foreach(_FILE ${TARGET_ADD_CONTENT_FILES})
list(APPEND _ADD_TO_SOURCES ${TARGET_ADD_CONTENT_FILE_BASE}${_FILE})
endforeach()

target_sources(${TARGET_ADD_CONTENT_TARGET}
PRIVATE
${TARGET_ADD_CONTENT_FILES}
${_ADD_TO_SOURCES}
${_DEP}
)

# do not compile and set group (visual studio)
set_source_files_properties(${TARGET_ADD_CONTENT_FILES} PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties(${_ADD_TO_SOURCES} PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties(${_DEP} PROPERTIES GENERATED TRUE)
setup_ide_folders(FILES ${TARGET_ADD_CONTENT_FILES} ${_DEP})
setup_ide_folders(FILES ${_ADD_TO_SOURCES} ${_DEP})

# collect files
foreach(_FILE ${TARGET_ADD_CONTENT_FILES})
if(MDL_LOG_FILE_DEPENDENCIES)
MESSAGE(STATUS "- content to copy: ${_FILE}")
MESSAGE(STATUS "- content to copy: ${TARGET_ADD_CONTENT_FILE_BASE}${_FILE}")
endif()
list(APPEND _COMMAND_LIST COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${_FILE} $<TARGET_FILE_DIR:${TARGET_ADD_CONTENT_TARGET}>/${_FILE})
list(APPEND _COMMAND_LIST COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_ADD_CONTENT_FILE_BASE}${_FILE} $<TARGET_FILE_DIR:${TARGET_ADD_CONTENT_TARGET}>/${_FILE})
list(APPEND _COMMAND_LIST COMMAND ${CMAKE_COMMAND} -E echo "update content file: ${_FILE}")
list(APPEND _COPY_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_FILE})
list(APPEND _COPY_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_ADD_CONTENT_FILE_BASE}${_FILE})
endforeach()

# delete dependency files of other configurations to enforce an update after the build type changed
Expand Down Expand Up @@ -968,8 +983,6 @@ if(MDL_ENABLE_TESTS)
PROJECT_LABEL "check"
FOLDER "tests"
)

set(MDL_TEST_LIST_POST "" CACHE INTERNAL "list of test directories to add after regular targets are defined")
endif()

# add tests to individual targets when defined in a corresponding sub-directory
Expand Down
Loading

0 comments on commit 5b1ab6f

Please sign in to comment.