Skip to content

Commit

Permalink
MDL SDK 2018.1.2 (312200.1281)
Browse files Browse the repository at this point in the history
  • Loading branch information
lkettnerNV committed Dec 14, 2018
1 parent 4e688e0 commit 2b2d06f
Show file tree
Hide file tree
Showing 1,602 changed files with 98,897 additions and 24,669 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
build/
install/
/build/
/install/
93 changes: 92 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,101 @@
Change Log
==========

MDL SDK 2018.1.2 (312200.1281): 11 Dec 2018
-----------------------------------------------

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

**Added and Changed Features**

- MDL 1.5 Language Specification
- A first pre-release draft of the NVIDIA Material Definition Language 1.5: Appendix E - Internationalization has been added to the documentation set.

- General
- Support for the internationalization of MDL string annotations has been added. See the MDL 1.5 Language Specification for details.
- A new API component `mi::neuraylib::IMdl_i18n_configuration` has been added, which can be used to query and change MDL internationalization settings.
- A new standalone tool to create XLIFF files has been added. See `i18n`.
- Calling `mi::neuraylib::ITransaction::remove()` on an MDL module will cause the module and all its definitions and other dependencies to be removed from the database as soon as it is no longer referenced by another module, material instance or function call. The actual removal is triggered by calling `mi::neuraylib::ITransaction::commit()`.
- A new API component `mi::neuraylib::Mdl_compatibility_api` has been added which allows to test archives and modules for compatibility.
- A new standalone tool to manage MDL archives has been added. See `mdlm`.
- A new API class `mi::neuraylib::IMdl_execution_context` intended to pass options to and receive messages from the MDL compiler has been added.
- A new API class `mi::neuraylib::IMessage` intended to propagate MDL compiler and SDK messages has been added.
- A new API function `mi::neuraylib::IMdl_factory::create_execution_context` has been added.
- The signatures of the API functions
- `mi::neuraylib::IMaterial_instance::create_compiled_material()`
- `mi::neuraylib::IMdl_compiler::load_module()`
- `mi::neuraylib::IMdl_compiler::load_module_from_string()`
- `mi::neuraylib::IMdl_compiler::export_module()`
- `mi::neuraylib::IMdl_compiler::export_module_to_string()`
- `mi::neuraylib::IMdl_backend::translate_environment()`
- `mi::neuraylib::IMdl_backend::translate_material_expression()`
- `mi::neuraylib::IMdl_backend::translate_material_df()`
- `mi::neuraylib::IMdl_backend::translate_material()`
- `mi::neuraylib::IMdl_backend::create_link_unit()`
- `mi::neuraylib::IMdl_backend::translate_link_unit()`
- `mi::neuraylib::ILink_unit::add_environment()`
- `mi::neuraylib::ILink_unit::add_material_expression()`
- `mi::neuraylib::ILink_unit::add_material_df()`
- `mi::neuraylib::ILink_unit::add_material()`

have been changed to use the new class `mi::neuraylib::IMdl_execution_context`.
The old versions have been deprecated and prefixed with `deprecated_`. They can
be restored to their original names by setting the preprocessor define
`MI_NEURAYLIB_DEPRECATED_9_1`.
- The API functions
- `mi::neuraylib::IMdl_backend::translate_material_expression_uniform_state()`
- `mi::neuraylib::IMdl_backend::translate_material_expressions()`

have been deprecated and prefixed with `deprecated_`. They can be restored to
their original names by setting the preprocessor define `MI_NEURAYLIB_DEPRECATED_9_1`.
- The utility classes
- `mi::neuraylib::Definition_wrapper` and
- `mi::neuraylib::Argument_editor`

have been extended to provide member access functions.

- MDL Compiler and Backends
- Support for automatic derivatives for 2D texture lookups has been added to the PTX,
Native x86 and LLVM IR backends. This feature can be enabled via the new backend option "texture_runtime_with_derivs". Please refer to the "Example for Texture Filtering with Automatic Derivatives" documentation for more details.
- Measured EDFs and BSDFs can now be translated to PTX, Native x86 and LLVM IR. Note that the texture runtime needs to be extended with utility functions that enable runtime access to the data.
- Spot EDFs can now be translated to PTX, Native x86 and LLVM IR.
- The `nvidia::df` module has been removed.

- MDL SDK examples
- Support for automatic derivatives has been added to the `example_execution_native`,`example_execution_cuda` and `example_df_cuda` examples, which can be enabled via a command line option.
- The `example_execution_native` example has been extended to allow to specify materials on the command line. It is now also possible to enable the user-defined texture runtime via a command line switch.
- The CUDA example texture runtime has been extended with support for measured EDF and BSDF data.
- The MDL Browser is now available as a QT QML Module which can also be integrated in non-qt based applications.
- Initial support for class compiled parameters of type `Texture`, `Light_profile`, and `Bsdf_measurement` has been added to `example_df_cuda`. So far, it is only possible to switch between all loaded resources, new resources cannot be added.

**Fixed Bugs**

- General
- An error when exporting presets where MDL definitions used in the arguments require a different version than the prototype definition has been fixed.

- MDL Compiler and Backends
- A missing check for validity of refracted directions has been added to the generated code for the evaluation of microfacet BSDFs.
- Incorrect code generation for `math::length()` with the atomic types `float` and `double` has been fixed.
- The computation of the minimum correction pattern in the MDL compiler has been fixed.
- The compilation of || and && inside DAG IR has been fixed.
- Pre and post increment/decrement operators when inlined into DAG-IR have been fixed.
- Previously missing mixed vector/atomic versions of `math::min()` and `math::max()`
have been added.
- The handling of (wrong) function references inside array constructor and init constructor has been fixed, producing better MDL compiler error messages.
- The hash computation of lambda functions with parameters has been fixed.
- If an absolute file url is given for a module to be resolved AND this module exists in the module cache, the module cache is used to determine its file name. This can speed up file resolution and allows the creation of presets even if the original module is not in the module path anymore.
- A memory leak in the JIT backend has been fixed.
- The generated names of passed expressions for code generation have been fixed.

**Known Restrictions**

- When generating code for distribution functions, the parameter `global_distribution` on spot and measured EDF's is currently ignored and assumed to be false.

MDL SDK 2018.1.1 (307800.2890): 15 Sep 2018
-----------------------------------------------

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

**Added and Changed Features**
Expand Down
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ if(MDL_LOG_PLATFORM_INFOS)
MESSAGE(STATUS "[INFO] MDL_BUILD_CORE_EXAMPLES: " ${MDL_BUILD_CORE_EXAMPLES})
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()

# -------------------------------------------------------------------------------------------------
# presets and utility functions used in all CMakeLists
include(${MDL_BASE_FOLDER}/cmake/utilities.cmake)
Expand All @@ -82,6 +90,7 @@ add_subdirectory(${MDL_SRC_FOLDER}/base/system/version)
# third party
add_subdirectory(${MDL_SRC_FOLDER}/base/lib/libzip)
add_subdirectory(${MDL_SRC_FOLDER}/base/lib/zlib)
add_subdirectory(${MDL_SRC_FOLDER}/base/lib/tinyxml2)
add_subdirectory(${MDL_SRC_FOLDER}/mdl/compiler/coco)
add_subdirectory(${MDL_SRC_FOLDER}/mdl/jit/llvm)

Expand Down Expand Up @@ -114,12 +123,15 @@ add_subdirectory(${MDL_SRC_FOLDER}/mdl/jit/generator_jit)
add_subdirectory(${MDL_SRC_FOLDER}/mdl/no_glsl/generator_stub)
add_subdirectory(${MDL_SRC_FOLDER}/mdl/no_jit/generator_stub)
add_subdirectory(${MDL_SRC_FOLDER}/mdl/runtime)
add_subdirectory(${MDL_SRC_FOLDER}/mdl/integration/i18n)
add_subdirectory(${MDL_SRC_FOLDER}/mdl/integration/mdlnr)
add_subdirectory(${MDL_SRC_FOLDER}/render/mdl/backends)
add_subdirectory(${MDL_SRC_FOLDER}/render/mdl/runtime)

# libs/products
add_subdirectory(${MDL_SRC_FOLDER}/prod/bin/i18n)
add_subdirectory(${MDL_SRC_FOLDER}/prod/bin/mdlc)
add_subdirectory(${MDL_SRC_FOLDER}/prod/bin/mdlm)
add_subdirectory(${MDL_SRC_FOLDER}/prod/lib/mdl_core)
add_subdirectory(${MDL_SRC_FOLDER}/prod/lib/mdl_sdk)

Expand Down Expand Up @@ -169,3 +181,4 @@ if(MDL_BUILD_CORE_EXAMPLES)
add_subdirectory(${MDL_EXAMPLES_FOLDER}/mdl_core/execution_cuda)
endif()
endif()

10 changes: 7 additions & 3 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,27 @@ licenses, and/or restrictions:
* zlib: [src/base/lib/zlib/README](src/base/lib/zlib/README)
* Coco/R: [src/mdl/compiler/coco/LICENSE](src/mdl/compiler/coco/LICENSE) (1)
* tinyxml2:
[src/base/lib/tinyxml2/tinyxml2.h](src/base/lib/tinyxml2/tinyxml2.h)
[src/base/lib/tinyxml2/tinyxml2.cpp](src/base/lib/tinyxml2/tinyxml2.cpp)
[examples/thirdparty/tinyxml2/include/tinyxml2.h](examples/thirdparty/tinyxml2/include/tinyxml2.h)
[examples/thirdparty/tinyxml2/src/tinyxml2.cpp](examples/thirdparty/tinyxml2/src/tinyxml2.cpp) (2)
[examples/thirdparty/tinyxml2/src/tinyxml2.cpp](examples/thirdparty/tinyxml2/src/tinyxml2.cpp)
* Dear ImGui with stb: [examples/thirdparty/imgui](examples/thirdparty/imgui) (2)

The documentation uses the following web fonts, CSS, and JavaScript frameworks with
additional or alternate copyrights, licenses, and/or restrictions:

* jQuery v3.2.1: [doc/js/jquery/jquery-3.2.1.min.js](doc/js/jquery/jquery-3.2.1.min.js), see https://jquery.org/license
* jQuery UI v1.12.1: [doc/base_module/ext/jquery/jquery-ui-1.12.1/LICENSE.txt](doc/base_module/ext/jquery/jquery-ui-1.12.1/LICENSE.txt)
* normalize.css v1.1.3: [doc/core_definitions/kt_css/normalize.css](doc/core_definitions/kt_css/normalize.css),
[doc/base_module/kt_css/normalize.css](doc/base_module/kt_css/normalize.css)
* Libre Baskerville: [doc/css/librebaskerville/LICENSE-LibreBaskerville.txt](doc/css/librebaskerville/LICENSE-LibreBaskerville.txt)
* Source Sans Pro: [doc/css/sourcesanspro/LICENSE-SourceSansPro.txt](doc/css/sourcesanspro/LICENSE-SourceSansPro.txt)
* Source Code Pro: [doc/css/sourcecodepro/LICENSE-SourceCodePro.txt](doc/css/sourcecodepro/LICENSE-SourceCodePro.txt)

**Notes**

(1) Coco/R is only used for code generation in the build process and is not
integrated by itself in the MDL SDK binaries.

(2) tinyxml2, Dear ImgUi and stb are only used in the examples and are not
integrated by themselves in the MDL SDK binaries.
(2) Dear ImgUi and stb are only used in the examples and are not integrated
by themselves in the MDL SDK binaries.
7 changes: 7 additions & 0 deletions cmake/dependencies/add_cuda.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ else()
${MDL_DEPENDENCY_CUDA_SHARED}
${LINKER_AS_NEEDED}
)

if(MACOSX)
target_link_libraries(${__TARGET_ADD_DEPENDENCY_TARGET}
PRIVATE
${MDL_DEPENDENCY_CUDA_LIBS} # cuda framework
)
endif()
endif()
endif()
endif()
40 changes: 24 additions & 16 deletions cmake/dependencies/add_qt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ else()
string(SUBSTRING ${Qt5_DIR} 0 ${_BASE_DIR_LENGTH} Qt5_BASE_DIR)
set(Qt5_BASE_DIR ${Qt5_BASE_DIR} CACHE INTERNAL "qt root directory for the current platform. This directory contains the bin directory for example.")

# options depending on the target type
get_target_property(_TARGET_TYPE ${__TARGET_ADD_DEPENDENCY_TARGET} TYPE)

# find the required packages
find_package(Qt5 COMPONENTS ${__TARGET_ADD_DEPENDENCY_COMPONENTS} REQUIRED)

Expand All @@ -36,8 +39,9 @@ else()
)

# copy runtime dependencies
# we assume that qt is not installed locally but available, e.g., on a network drive
if(WINDOWS)
if (WINDOWS AND _TARGET_TYPE STREQUAL "EXECUTABLE")

# we assume that qt is not installed locally but available, e.g., on a network drive
target_copy_to_output_dir(TARGET ${__TARGET_ADD_DEPENDENCY_TARGET}
RELATIVE ${Qt5_BASE_DIR}/bin
FILES Qt5${qt_component}$<$<CONFIG:DEBUG>:d>.dll)
Expand Down Expand Up @@ -82,11 +86,13 @@ else()
${LINKER_AS_NEEDED}
)

target_copy_to_output_dir(TARGET ${__TARGET_ADD_DEPENDENCY_TARGET}
FILES
"${Qt5_BASE_DIR}/plugins/xcbglintegrations"
"${Qt5_BASE_DIR}/plugins/egldeviceintegrations"
)
if (_TARGET_TYPE STREQUAL "EXECUTABLE")
target_copy_to_output_dir(TARGET ${__TARGET_ADD_DEPENDENCY_TARGET}
FILES
"${Qt5_BASE_DIR}/plugins/xcbglintegrations"
"${Qt5_BASE_DIR}/plugins/egldeviceintegrations"
)
endif()

elseif(MACOSX)
target_link_libraries(${__TARGET_ADD_DEPENDENCY_TARGET}
Expand All @@ -95,13 +101,15 @@ else()
)
endif()

# copy qml dependencies which are not found if qt is not installed locally
target_copy_to_output_dir(TARGET ${__TARGET_ADD_DEPENDENCY_TARGET}
FILES
"${Qt5_BASE_DIR}/qml/QtGraphicalEffects"
"${Qt5_BASE_DIR}/qml/QtQuick"
"${Qt5_BASE_DIR}/qml/QtQuick.2"
"${Qt5_BASE_DIR}/plugins/platforms"
"${Qt5_BASE_DIR}/plugins/imageformats"
)
if (_TARGET_TYPE STREQUAL "EXECUTABLE")
# copy qml dependencies which are not found if qt is not installed locally
target_copy_to_output_dir(TARGET ${__TARGET_ADD_DEPENDENCY_TARGET}
FILES
"${Qt5_BASE_DIR}/qml/QtGraphicalEffects"
"${Qt5_BASE_DIR}/qml/QtQuick"
"${Qt5_BASE_DIR}/qml/QtQuick.2"
"${Qt5_BASE_DIR}/plugins/platforms"
"${Qt5_BASE_DIR}/plugins/imageformats"
)
endif()
endif()
8 changes: 7 additions & 1 deletion cmake/find/find_cuda_ext.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ function(FIND_CUDA_EXT)
${_CUDA_SDK_DIR}/lib64
# macosx
/usr/local/cuda/lib
${_CUDA_SDK_DIR}/lib
)
find_file(_CUDART_SO
NAMES
Expand All @@ -100,6 +101,7 @@ function(FIND_CUDA_EXT)
${_CUDA_SDK_DIR}/lib64
# macosx
/usr/local/cuda/lib
${_CUDA_SDK_DIR}/lib
)

# error if dependencies can not be resolved
Expand All @@ -109,9 +111,13 @@ function(FIND_CUDA_EXT)
message(STATUS "_CUDART_SO: ${_CUDART_SO}")
message(FATAL_ERROR ${_DEFAULT_ERROR_MESSAGE})
endif()

list(APPEND _CUDA_SHARED ${_CUDA_SO})
list(APPEND _CUDA_SHARED ${_CUDART_SO})

if(MACOSX)
list(APPEND _CUDA_LIBS "-F${_CUDA_SDK_DIR}/lib/stubs -Xlinker -framework -Xlinker CUDA")
endif()
endif()

# store path that are later used in the add_cuda.cmake
Expand Down
Loading

0 comments on commit 2b2d06f

Please sign in to comment.