Skip to content

Commit 45f825e

Browse files
MDL SDK 2023.1 (373000.1077)
1 parent b4c3c5b commit 45f825e

File tree

1,221 files changed

+136996
-24110
lines changed

Some content is hidden

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

1,221 files changed

+136996
-24110
lines changed

.gitattributes

+4
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
examples/thirdparty/content/fonts/NotoSansCJK-Medium.ttc filter=lfs diff=lfs merge=lfs -text
22
examples/mdl/nvidia/sdk_examples/resources/environment.hdr filter=lfs diff=lfs merge=lfs -text
3+
src/io/image/image/tests/reference/export_of_test_gray_alpha_bpc_2.png.png filter=lfs diff=lfs merge=lfs -text
4+
src/io/image/image/tests/reference/export_of_test_pt_uint16.png.tif filter=lfs diff=lfs merge=lfs -text
5+
src/io/image/image/tests/reference/export_of_test_jpg_progressive.jpg.png filter=lfs diff=lfs merge=lfs -text
6+
src/io/image/image/tests/test_pt_uint16.png filter=lfs diff=lfs merge=lfs -text

CHANGELOG.md

+142-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,150 @@
11
Change Log
22
==========
3-
MDL SDK 2023.0.6 (367100.5773): 03 Nov 2023
3+
MDL SDK 2023.1.0 (373000.1077): 14 Dec 2023
44
-----------------------------------------------
55

66

7+
ABI compatible with the MDL SDK 2023.1.0 (373000.1077) binary release
8+
(see [https://developer.nvidia.com/mdl-sdk](https://developer.nvidia.com/mdl-sdk))
9+
10+
**Known Issues and Restrictions**
11+
12+
- MDLE export can fail in this release with broken .mlde files that contain malformed MDL code.
13+
14+
**Added and Changed Features**
15+
16+
- General
17+
- Added `rotate_around_x/y/z` functions to `::nvidia::support_definitions`.
18+
- The MDL SDK comes now with unit tests. Building of the unit tests is
19+
controlled via the `cmake` option `MDL_ENABLE_UNIT_TESTS`. Unit
20+
tests can be executed from the command line via CTest, `make test`,
21+
or the Visual Studio solution. Some unit tests require the `idiff`
22+
tool from `OpenImageIO`.
23+
- The baker uses now multiple threads.
24+
- The deprecated `FreeImage` plugin as been removed.
25+
- The recommended `vcpkg` version has been updated. It is now also
26+
recommended to install `GLEW` and `GLFW` via `vcpkg`. The
27+
feature flag `tools` for `OpenImageIO` is now required by some
28+
unit tests.
29+
- The database used by the MDL SDK supports now multiple parallel
30+
transactions. See the documentation of `ITransaction` for visibility
31+
and conflict resolution. This change includes adding support for
32+
`ITransaction::abort()`. As a consequence, if an `ITransaction` is
33+
released without committing or aborting, it is now automatically aborted
34+
with a warning instead of being committed with an error message.
35+
- The new API component `ILogging_configuration` has been added to the
36+
MDL SDK. The API methods `IMdl_configuration::set_logger()` and
37+
`get_logger()` have been deprecated. Use
38+
`ILogging_configuration::set_receiving_logger()` and
39+
`ILogging_configuration::get_receiving/forwarding_logger()` instead. The
40+
old methods are still available if `MI_NEURAYLIB_DEPRECATED_14_1` is
41+
defined. Use `ILogging_configuration::set_log_prefix(0)` to prevent
42+
the forwarding logger from automatically adding the severity to the log
43+
message.
44+
- Additional performance improvements, in particular with a focus on
45+
creation of compiled materials.
46+
- The new methods `IType_factory::get_mdl_type_name()` and
47+
`create_from_mdl_type_name()` allow to serialize and deserialize types via
48+
their type names.
49+
- The new method `IType_factory::get_mdl_module_name()` returns the
50+
name of the MDL module that defines a given type. This is primarily
51+
useful for enum and struct types.
52+
- The method `IType_array::get_deferred_size()` returns now the
53+
"simple" symbol name, e.g., "N" instead of the fully qualified one.
54+
- The method `IExpression_factory::create_direct_call()` allows now to
55+
create calls to unexported functions. Note that such calls can only be
56+
used in the same module as the called function.
57+
- When loading textures via an MDL module, failures do no longer cause a
58+
dummy instance of `ITexture` to be created and
59+
`IValue_texture::get_value()` returns now a NULL pointer.
60+
- Python Bindings:
61+
- Added more missing interface functions to the bindings.
62+
- Removed all generated `"declare_interface"`-types.
63+
- Added post build step to strip unused types and functions and
64+
marked constructors invalid.
65+
- Fixed `"error"`-out-parameters by providing a ReturnCode type that can be passed
66+
by reference.
67+
- Added `UUID` comparison for interface types.
68+
- Updated the binding of enums which are now Python enums in the appropriate scope.
69+
- Extended unit tests written in Python.
70+
- Added a coverage report option for the unit tests written in Python.
71+
- Added missing and fixed existing `get/set_value` functions for various `IData` class bindings.
72+
- Mapping now `mi::Size` to `Sint64` to handle `-1` returns correctly.
73+
- Removed the `IAttribute_set` function from scene elements.
74+
75+
- MDL Compiler and Backends
76+
- Removed unused `exception_state` parameter from generated functions for non-native backends
77+
to improve performance. Needs update in renderers calling these functions.
78+
- Let generated functions for material expressions of base types and vector types return
79+
their values directly instead via a result buffer by setting the new backend option
80+
`"lambda_return_mode"` to `"value"`. Only supported by the PTX and the LLVM-IR backend.
81+
- Generated auxiliary functions now separate albedo into diffuse and glossy, similar to the evaluate functions.
82+
- Generated auxiliary functions now also report roughness.
83+
84+
- MDL Distiller and Baker
85+
- Debugging features for mdltlc: `debug_name` and `debug_print` statements
86+
in MDLTL rules files.
87+
- Added mdltl unit tests.
88+
89+
- MDL SDK examples
90+
- Replaced compiler define `NO_DIRECT_CALL` by command line parameter
91+
`--use-direct-call` to make it easier to try both variants.
92+
- Adapted MDL SDK df_cuda and OptiX 7 examples to use the new value return mode.
93+
The MDL Core df_cuda example still uses the old default mode (`"sret"`).
94+
- AxF Example:
95+
- Updated to Pantora 1.9.0.
96+
- Added search path command line options.
97+
- Example DXR:
98+
- Changed hardware sampler mode to clamp and implemented repeat by software
99+
to fix edge cases when cropping.
100+
- Added a MaterialX to MDL version number parameter in preparation for
101+
upcoming MaterialX releases.
102+
- Added options to render multiple auxiliary outputs to file in one run.
103+
104+
**Fixed Bugs**
105+
106+
- General
107+
- base.mdl:
108+
- Improved tangent space handling for bump maps. Noise-based bump mapping is now
109+
oriented correctly for object and world space coordinate sources.
110+
- Additionally, coordinate transforms change the orientation consistently now.
111+
This adds one field to `base::texture_coordinate_info`.
112+
- Added a work-around to handle user defined constants inside the code that is added using
113+
`add_function()` to an existing MDL module in the `MDL_module_builder` interface.
114+
This can only handle cases where the user defined type is either defined locally
115+
or imported using an absolute path.
116+
- Python Binding: Fixed proxy parameter handling of `"IMdl_distiller_api::create_baker"`
117+
and `"ILight_profile::reset_*"` functions.
118+
119+
- MDL Compiler and Backends
120+
- Fixed auto-import of enum conversion operators.
121+
- Fixed a case where the `auto-importer` was not able to import conversion operators
122+
(`enum-to-int`), which caused wrong prefixed constructors when exporting MDL,
123+
e.g. `base::int(value)`.
124+
- Adapted data layout for PTX to match data layout used by CUDA compiler
125+
to avoid problems with misaligned data types.
126+
- Fixed wrong function indices set for init functions in single-init mode,
127+
when `ILink_unit::add_material()` is called more than once.
128+
- Fixed invalid CUDA prototypes returned by
129+
`mi::neuraylib::ITarget_code::get_callable_function_prototype()`.
130+
- Fixed `texremapu` in `base.mdl` for GLSL resulting in undefined behaviour
131+
for negative texture coordinates.
132+
- Improved handling of invalid MDL code in the MDL compiler.
133+
134+
- MDL Distiller and Baker
135+
- Fixed printing of `NaN`, `+inf` and `-inf` constants in the `mdl_distiller_cli`
136+
command line utility. They are now printed as `(0.0/0.0)`, `(1.0/0.0)` and `(-1.0/0.0)`
137+
respectively, same as in the MDL compiler and SL backends.
138+
- mdltlc: Fixed code generation for rules with node names.
139+
- mdltlc: Fixed code generation for creation of conditional expressions.
140+
141+
- MDL SDK examples
142+
- Example DXR: Fixed resource creation warnings reported with the
143+
`"--gpu-debug"` option on Windows 11.
144+
145+
MDL SDK 2023.0.6 (367100.5773): 03 Nov 2023
146+
-----------------------------------------------
147+
7148
ABI compatible with the MDL SDK 2023.0.6 (367100.5773) binary release
8149
(see [https://developer.nvidia.com/mdl-sdk](https://developer.nvidia.com/mdl-sdk))
9150

@@ -47,7 +188,6 @@ ABI compatible with the MDL SDK 2023.0.6 (367100.5773) binary release
47188
(fixes only some asserts in debug mode).
48189
- Fixed HLSL/GLSL code generation for access to single element compound types,
49190
like arrays of length `1` or structs with only one field.
50-
51191

52192
MDL SDK 2023.0.4 (367100.4957): 05 Oct 2023
53193
-----------------------------------------------

CMakeLists.txt

+12-81
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ elseif(NOT CMAKE_TOOLCHAIN_FILE AND NOT UNIX)
5454
endif()
5555

5656
# before project() due to its use in CMAKE_TOOLCHAIN_FILE
57-
if(WIN32 AND NOT UNIX)
57+
if(WIN32 AND NOT UNIX AND NOT DEFINED VCPKG_TARGET_TRIPLET)
5858
set(VCPKG_TARGET_TRIPLET x64-windows-static)
5959
endif()
6060

@@ -72,7 +72,6 @@ option(MDL_BUILD_SDK_EXAMPLES "Adds MDL SDK examples to the build." ON)
7272
option(MDL_BUILD_CORE_EXAMPLES "Adds MDL Core examples to the build." ON)
7373
option(MDL_BUILD_ARNOLD_PLUGIN "Enable the build of the MDL Arnold plugin." OFF)
7474
option(MDL_BUILD_DDS_PLUGIN "Enable the build of the MDL DDS image plugin." ON)
75-
option(MDL_BUILD_FREEIMAGE_PLUGIN "Enable the build of the MDL Freeimage image plugin." OFF)
7675
option(MDL_BUILD_OPENIMAGEIO_PLUGIN "Enable the build of the MDL OpenImageIO image plugin." ON)
7776
option(MDL_LOG_PLATFORM_INFOS "Prints some infos about the current build system (relevant for error reports)." ON)
7877
option(MDL_LOG_DEPENDENCIES "Prints the list of dependencies during the generation step." ON)
@@ -98,12 +97,11 @@ if(MDL_LOG_PLATFORM_INFOS)
9897
MESSAGE(STATUS "[INFO] MDL_BUILD_CORE_EXAMPLES: ${MDL_BUILD_CORE_EXAMPLES}")
9998
MESSAGE(STATUS "[INFO] MDL_BUILD_ARNOLD_PLUGIN: ${MDL_BUILD_ARNOLD_PLUGIN}")
10099
MESSAGE(STATUS "[INFO] MDL_BUILD_OPENIMAGEIO_PLUGIN: ${MDL_BUILD_OPENIMAGEIO_PLUGIN}")
101-
MESSAGE(STATUS "[INFO] MDL_BUILD_FREEIMAGE_PLUGIN: ${MDL_BUILD_FREEIMAGE_PLUGIN}")
102100
MESSAGE(STATUS "[INFO] MDL_BUILD_DDS_PLUGIN: ${MDL_BUILD_DDS_PLUGIN}")
103101
endif()
104102

105-
# enable tests if available
106-
if(MDL_ENABLE_TESTS)
103+
# enable CTest if requested
104+
if(MDL_ENABLE_TESTS OR MDL_ENABLE_UNIT_TESTS)
107105
enable_testing()
108106
endif()
109107

@@ -118,82 +116,16 @@ include(${MDL_BASE_FOLDER}/cmake/utilities.cmake)
118116
#--------------------------------------------------------------------------------------------------
119117
add_subdirectory(${MDL_INCLUDE_FOLDER})
120118

121-
# MDL SDK and MDL CORE
119+
# MDL SDK, MDL CORE, libs/tools, and plugins
122120
#--------------------------------------------------------------------------------------------------
123121

124-
# first thing to build
125-
add_subdirectory(${MDL_SRC_FOLDER}/base/system/main)
126-
add_subdirectory(${MDL_SRC_FOLDER}/base/system/stlext)
127-
add_subdirectory(${MDL_SRC_FOLDER}/base/system/version)
128-
129-
# third party
130-
add_subdirectory(${MDL_SRC_FOLDER}/base/lib/libzip)
131-
add_subdirectory(${MDL_SRC_FOLDER}/base/lib/zlib)
132-
add_subdirectory(${MDL_SRC_FOLDER}/base/lib/tinyxml2)
133-
add_subdirectory(${MDL_SRC_FOLDER}/mdl/compiler/coco)
134-
add_subdirectory(${MDL_SRC_FOLDER}/mdl/jit/llvm)
135-
136-
# libs
137-
add_subdirectory(${MDL_SRC_FOLDER}/base/util/string_utils)
138-
add_subdirectory(${MDL_SRC_FOLDER}/base/util/registry)
139-
add_subdirectory(${MDL_SRC_FOLDER}/base/hal/disk)
140-
add_subdirectory(${MDL_SRC_FOLDER}/base/hal/hal)
141-
add_subdirectory(${MDL_SRC_FOLDER}/base/hal/link)
142-
add_subdirectory(${MDL_SRC_FOLDER}/base/hal/time)
143-
add_subdirectory(${MDL_SRC_FOLDER}/base/lib/config)
144-
add_subdirectory(${MDL_SRC_FOLDER}/base/lib/cont)
145-
add_subdirectory(${MDL_SRC_FOLDER}/base/lib/log)
146-
add_subdirectory(${MDL_SRC_FOLDER}/base/lib/mem)
147-
add_subdirectory(${MDL_SRC_FOLDER}/base/lib/path)
148-
add_subdirectory(${MDL_SRC_FOLDER}/base/lib/plug)
149-
add_subdirectory(${MDL_SRC_FOLDER}/base/data/attr)
150-
add_subdirectory(${MDL_SRC_FOLDER}/base/data/db)
151-
add_subdirectory(${MDL_SRC_FOLDER}/base/data/dblight)
152-
add_subdirectory(${MDL_SRC_FOLDER}/base/data/serial)
153-
add_subdirectory(${MDL_SRC_FOLDER}/io/image)
154-
add_subdirectory(${MDL_SRC_FOLDER}/io/scene)
155-
add_subdirectory(${MDL_SRC_FOLDER}/api/api/mdl)
156-
add_subdirectory(${MDL_SRC_FOLDER}/mdl/codegenerators/generator_code)
157-
add_subdirectory(${MDL_SRC_FOLDER}/mdl/codegenerators/generator_dag)
158-
add_subdirectory(${MDL_SRC_FOLDER}/mdl/compiler/compilercore)
159-
add_subdirectory(${MDL_SRC_FOLDER}/mdl/compiler/compiler_glsl)
160-
add_subdirectory(${MDL_SRC_FOLDER}/mdl/compiler/compiler_hlsl)
161-
add_subdirectory(${MDL_SRC_FOLDER}/mdl/distiller/dist)
162-
add_subdirectory(${MDL_SRC_FOLDER}/mdl/jit/libbsdf)
163-
add_subdirectory(${MDL_SRC_FOLDER}/mdl/jit/libmdlrt)
164-
add_subdirectory(${MDL_SRC_FOLDER}/mdl/jit/devlib)
165-
add_subdirectory(${MDL_SRC_FOLDER}/mdl/jit/generator_jit)
166-
add_subdirectory(${MDL_SRC_FOLDER}/mdl/no_jit/generator_stub)
167-
add_subdirectory(${MDL_SRC_FOLDER}/mdl/runtime)
168-
add_subdirectory(${MDL_SRC_FOLDER}/mdl/integration/i18n)
169-
add_subdirectory(${MDL_SRC_FOLDER}/mdl/integration/mdlnr)
170-
add_subdirectory(${MDL_SRC_FOLDER}/render/baker/baker)
171-
add_subdirectory(${MDL_SRC_FOLDER}/render/mdl/backends)
172-
add_subdirectory(${MDL_SRC_FOLDER}/render/mdl/runtime)
173-
174-
# libs/products
175-
add_subdirectory(${MDL_SRC_FOLDER}/prod/lib/mdl_core)
176-
add_subdirectory(${MDL_SRC_FOLDER}/prod/lib/mdl_sdk)
177-
add_subdirectory(${MDL_SRC_FOLDER}/prod/bin/i18n)
178-
add_subdirectory(${MDL_SRC_FOLDER}/prod/bin/mdlc)
179-
add_subdirectory(${MDL_SRC_FOLDER}/prod/bin/mdlm)
180-
add_subdirectory(${MDL_SRC_FOLDER}/prod/bin/mdltlc)
181-
add_subdirectory(${MDL_SRC_FOLDER}/prod/bin/mdl_distiller_cli)
182-
183-
# PLUGINS
184-
#--------------------------------------------------------------------------------------------------
185-
186-
if(MDL_BUILD_DDS_PLUGIN)
187-
add_subdirectory(${MDL_SRC_FOLDER}/shaders/plugin/dds)
188-
endif()
189-
if(MDL_BUILD_FREEIMAGE_PLUGIN)
190-
add_subdirectory(${MDL_SRC_FOLDER}/shaders/plugin/freeimage)
191-
endif()
192-
if(MDL_BUILD_OPENIMAGEIO_PLUGIN)
193-
add_subdirectory(${MDL_SRC_FOLDER}/shaders/plugin/openimageio)
194-
endif()
195-
196-
add_subdirectory(${MDL_SRC_FOLDER}/shaders/plugin/mdl_distiller)
122+
add_subdirectory(${MDL_SRC_FOLDER}/api)
123+
add_subdirectory(${MDL_SRC_FOLDER}/base)
124+
add_subdirectory(${MDL_SRC_FOLDER}/mdl)
125+
add_subdirectory(${MDL_SRC_FOLDER}/io)
126+
add_subdirectory(${MDL_SRC_FOLDER}/render)
127+
add_subdirectory(${MDL_SRC_FOLDER}/prod)
128+
add_subdirectory(${MDL_SRC_FOLDER}/shaders)
197129

198130
# EXAMPLES
199131
#--------------------------------------------------------------------------------------------------
@@ -280,8 +212,7 @@ if(MDL_BUILD_SDK_EXAMPLES OR MDL_BUILD_CORE_EXAMPLES)
280212
add_subdirectory(${MDL_EXAMPLES_FOLDER}/mdl)
281213
endif()
282214

283-
# MDL SDK libs/products and
284-
# PLUGINS FOR EXTERNAL APPLICATIONS that use the MDL SDK and mdl_sdk::shared
215+
# MDL SDK libs/products and plugins that depend on the MDL SDK and mdl_sdk::shared
285216
#--------------------------------------------------------------------------------------------------
286217
# MDL Arnold
287218
if(MDL_BUILD_ARNOLD_PLUGIN)

0 commit comments

Comments
 (0)