Skip to content

Commit e26aef8

Browse files
MDL SDK 2024.0.2 (377400.2626)
1 parent 203d514 commit e26aef8

File tree

60 files changed

+907
-365
lines changed

Some content is hidden

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

60 files changed

+907
-365
lines changed

CHANGELOG.md

+28
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
Change Log
22
==========
3+
MDL SDK 2024.0.2 (377400.2626): 07 Aug 2024
4+
-----------------------------------------------
5+
6+
ABI compatible with the MDL SDK 2024.0.2 (377400.2626) binary release
7+
(see [https://developer.nvidia.com/mdl-sdk](https://developer.nvidia.com/mdl-sdk))
8+
9+
**Added and Changed Features**
10+
11+
- General
12+
- MDL Arnold: Added support for Arnold SDK version 7.3.2.1.
13+
14+
**Fixed Bugs**
15+
16+
- General
17+
- Fixed missing leading "::" for qualified names reported by `IMdl_discovery_api`,
18+
if search paths had a trailing OS separator.
19+
- Improved error message that can be triggered when calling non-const methods
20+
on const objects. This can e.g. be triggered via the Python binding by accessing
21+
(not editing) database elements.
22+
- Improved coverage tests for the Python binding.
23+
24+
- MDL Compiler and Backends
25+
- Fixed crash in some cases when derivatives were calculated for a struct also containing
26+
non-floating point fields.
27+
- Fixed wrong digit that can be added to `tex::texture_isvalid()` calls for
28+
HLSL and GLSL backends, if more than one texture type (for instance `texture_2d` and
29+
`texture_3d`) are used together in one module.
30+
331
MDL SDK 2024.0.1 (377400.2109): 18 Jul 2024
432
-----------------------------------------------
533

LICENSE.md

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
MDL SDK Copyright and License
2-
=============================
3-
41
Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.
52

63
Redistribution and use in source and binary forms, with or without

doc/base_module/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ <h3>Edge</h3>
169169

170170
</div><div id="blackfooter">
171171
<span class="footeritem">
172-
17&#160;July&#160;2024,&#160;19:52,&#160;rev379530, v1.3
172+
6&#160;August&#160;2024,&#160;19:57,&#160;rev380010, v1.3
173173
</span>
174174
<span class="footeritem">
175175
<a href="https://www.nvidia.com/en-us/about-nvidia/legal-info/">&copy; 2024 NVIDIA&nbsp;Corporation.</a> All rights reserved.

doc/build/doxygen_footer.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- start footer part -->
33
<!--BEGIN GENERATE_TREEVIEW-->
44
<div id="nav-path">
5-
<span class="footeritem">MDL SDK 2024.0.1 (377400.2109): $datetime</span>
5+
<span class="footeritem">MDL SDK 2024.0.2 (377400.2626): $datetime</span>
66
<span class="footeritem">
77
<a href="http://www.nvidia.com/">
88
&copy;&#160;2024&#160;NVIDIA&#160;Corporation.</a>

doc/core_definitions/index.html

+8-1
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,13 @@ <h2>Page cannot be loaded</h2>
198198
</li>
199199
</ol>
200200

201+
<p>The documentation is also available as a PDF file from the links in the black bar at the
202+
bottom of the page or from the following links:</p>
203+
204+
<div style="padding-left:2em;">
205+
<a href="mdl_core_definitions.240806.A4.pdf">View documentation in A4 format</a><br>
206+
<a href="mdl_core_definitions.240806.LTR.pdf">View documentation in US Letter format</a><br>
207+
</div>
201208
<h3>Overriding security settings</h3>
202209

203210
<p>If the problem is due to the configuration of the browser (case #3),
@@ -270,7 +277,7 @@ <h3>Edge</h3>
270277
<span class="footeritem">
271278
</span>
272279
<span class="footeritem">
273-
17&#160;July&#160;2024,&#160;19:52,&#160;rev379530, v1.4
280+
6&#160;August&#160;2024,&#160;19:58,&#160;rev380010, v1.4
274281
</span>
275282
<span class="footeritem">
276283
<a href="https://www.nvidia.com/en-us/about-nvidia/legal-info/">&copy; 2024 NVIDIA&nbsp;Corporation.</a> All rights reserved.

doc/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
</div>
6262
<div id="blackfooter">
6363
<span class="footeritem">
64-
MDL SDK 2024.0.1 (377400.2109): 18 Jul 2024
64+
MDL SDK 2024.0.2 (377400.2626): 07 Aug 2024
6565
</span>
6666
<span class="footeritem">
6767
<a href="http://www.nvidia.com/">&copy;&#160;2024&#160;NVIDIA&#160;Corporation.</a> &#160;All&#160;rights&#160;reserved.

doc/mdl_sdkapi/example_axf_to_mdl.dox

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ This example loads an X-Rite AxF(Appearance Exchange Format) file and converts i
4646
AxF to MDL material format conversion
4747
</b></dt>
4848
<dd><br>
49-
The example first loads an AxF file and parses it using the AxF Decoding SDK (not distributed with MDL-SDK,
49+
The example first loads an AxF file and parses it using the AxF Decoding SDK (not distributed with MDL SDK,
5050
please check \link mi_neuray_getting_started Getting started \endlink for further information) in order to decode AxF material representations, its parameters,
5151
its resources such a texture bitmaps, measurements, and metadata.
5252

@@ -60,7 +60,7 @@ This example loads an X-Rite AxF(Appearance Exchange Format) file and converts i
6060

6161
This means The MDL representations will have a close visual appearance to its AxF equivalents and will expose the same input parameters.
6262

63-
This way, by using MDL-SDK, the example will load this module and use it as template to create material variations to map parameters,
63+
This way, by using MDL SDK, the example will load this module and use it as template to create material variations to map parameters,
6464
textures and measurements between MDL and AxF representations and so achieving the conversion.
6565

6666
Finally, the example will write a output MDL file with the resulting variation(s) along its resources (bitmaps).

doc/mdl_sdkapi/example_distilling_target.dox

+5-5
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ distilled.
5252
</b></dt>
5353
<dd><br>
5454
A custom Distiller plugin is a shared library that is loaded
55-
into the MDL-SDK and provides one or more custom distilling
55+
into the MDL SDK and provides one or more custom distilling
5656
target(s) to the an application. The application is
5757
responsible for loading the plugin and can then use the
5858
target(s) through the Distiller API, just as for the targets
5959
from the <tt>mdl_distiller</tt> plugin which is part of the
60-
MDL-SDK.
60+
MDL SDK.
6161

6262
The \ref example_distilling_target "example program" described
6363
below loads an example plugin and distills a material to the
@@ -91,7 +91,7 @@ distilled.
9191
Note that the example plugin implements one target. The
9292
plugin interface is general enough so that plugins could
9393
implement more than one in the same plugin. The distiller
94-
plugin <tt>mdl_distilller</tt> that comes with the MDL-SDK
94+
plugin <tt>mdl_distiller</tt> that comes with the MDL SDK
9595
does exactly that and implements multiple targets.
9696

9797
<!-- Workaround to prevent a layout problem after dd tags. -->
@@ -109,15 +109,15 @@ distilled.
109109
which rule sets are applied to a material graph, and in which
110110
order.
111111

112-
Each rule consists of a left- and a right-hadn side. The
112+
Each rule consists of a left- and a right-hand side. The
113113
left-hand side is a pattern that matches a graph node and
114114
binds variables, and the right-hand side specifies the
115115
replacement for the matched rule.
116116

117117
When a rule set is applied to a material, the Distiller will
118118
attempt to match all rules of a rule set, in order, to each
119119
node in the material graph. When it matches, the variables in
120-
the lefthand pattern of the rule are bound to subexpressions
120+
the left-hand pattern of the rule are bound to subexpressions
121121
of the current node, and the node on the right-hand side is
122122
constructed, possibly including expressions bound by the
123123
left-hand pattern. After a successful match, the Distiller

doc/mdl_sdkapi/example_mdl_browser.dox

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ configured search paths.
6969
Each node in the tree can save various information in form of key-value-pairs.
7070
This allows us to store names, authors, descriptions or other data, mainly gathered from
7171
annotations, for each exported material or function. The example also contains an
72-
implementation of the IMdl_cache_serializer, which exports the cache to a xml file
72+
implementation of the IMdl_cache_serializer, which exports the cache to a XML file
7373
and imports it back again when the application is started the next time.
7474

7575
In the current implementation, all modules that are not already in the cache,

doc/mdl_sdkapi/example_modules.dox

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ This example loads an MDL module and inspects it contents.
9191
<dd><br>
9292
MDL materials and functions (as found in a \c .mdl file) are represented in the
9393
\neurayApiName by the interface #mi::neuraylib::IFunction_definition. Similar to the module
94-
interface thi interface offers various methods related to metadata, like the name of the
94+
interface this interface offers various methods related to metadata, like the name of the
9595
definition, or the name of the containing module. Important methods are those that provide
9696
details about the parameters, like their names, types, and the values of defaults (if
9797
present).

doc/mdl_sdkapi/mdltl.dox

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ plugins is documented in three parts:
3636
compiled rules created by the MDLTL compiler in a Distiller plugin.
3737

3838
- \subpage mi_neuray_mdltl_spec <br>
39-
Specification of MDLT, including a detailed description of the
39+
Specification of MDLTL, including a detailed description of the
4040
language.
4141

4242
- \subpage mi_neuray_mdltl_grammar <br>

doc/mdl_sdkapi/mdltl_manual.dox

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ rule engine to repeatedly apply transformation rules to nodes in the
7676
material graph. Transformation rules are implemented as subclasses of
7777
the class `mi::mdl::IRule_matcher`. These classes for rule-matching can
7878
be written by hand, but a more convenient and less error-prone option
79-
is to write rules in the <i>MDL Transforamtion Language (MDLTL)</i>. MDLTL is a
79+
is to write rules in the <i>MDL Transformation Language (MDLTL)</i>. MDLTL is a
8080
domain-specific language for describing transformations on MDL
8181
materials. These transformations are expressed as a set of rules which
8282
are compiled to C++ code and are then linked into Distiller plugins.

doc/mdl_sdkapi/mdltl_spec.dox

+4-4
Original file line numberDiff line numberDiff line change
@@ -460,19 +460,19 @@ are transformed into calls to one of the functions:
460460
- `bsdf_unbounded_mix_1, bsdf_unbounded_mix_2, bsdf_unbounded_mix_3, bsdf_unbounded_mix_4`
461461
- `bsdf_color_mix_1, bsdf_color_mix_2, bsdf_color_mix_3, bsdf_color_mix_4`
462462
- `bsdf_color_clamped_mix_1, bsdf_color_clamped_mix_2, bsdf_color_clamped_mix_3, bsdf_color_clamped_mix_4`
463-
- `bsdf_color_unboudned_mix_1, bsdf_color_unbounded_mix_2, bsdf_color_unbounded_mix_3, bsdf_color_unbounded_mix_4`
463+
- `bsdf_color_unbounded_mix_1, bsdf_color_unbounded_mix_2, bsdf_color_unbounded_mix_3, bsdf_color_unbounded_mix_4`
464464
- `edf_mix_1, edf_mix_2, edf_mix_3, edf_mix_4`
465465
- `edf_clamped_mix_1, edf_clamped_mix2, edf_clamped_mix_3, edf_clamped_mix_4`
466466
- `edf_unbounded_mix_1, edf_unbounded_mix_2, edf_unbounded_mix_3, edf_unbounded_mix_4`
467467
- `edf_color_mix_1, edf_color_mix_2, edf_color_mix_3, edf_color_mix_4`
468468
- `edf_color_clamped_mix_1, edf_color_clamped_mix_2, edf_color_clamped_mix_3, edf_color_clamped_mix_4`
469-
- `edf_color_unboudned_mix_1, edf_color_unbounded_mix_2, edf_color_unbounded_mix_3, edf_color_unbounded_mix_4`
469+
- `edf_color_unbounded_mix_1, edf_color_unbounded_mix_2, edf_color_unbounded_mix_3, edf_color_unbounded_mix_4`
470470
- `vdf_mix_1, vdf_mix_2, vdf_mix_3, vdf_mix_4`
471471
- `df_clamped_mix_1, vdf_clamped_mix2, vdf_clamped_mix_3, vdf_clamped_mix_4`
472472
- `vdf_unbounded_mix_1, vdf_unbounded_mix_2, vdf_unbounded_mix_3, vdf_unbounded_mix_4`
473473
- `vdf_color_mix_1, vdf_color_mix_2, vdf_color_mix_3, vdf_color_mix_4`
474474
- `vdf_color_clamped_mix_1, vdf_color_clamped_mix_2, vdf_color_clamped_mix_3, vdf_color_clamped_mix_4`
475-
- `vdf_color_unboudned_mix_1, vdf_color_unbounded_mix_2, vdf_color_unbounded_mix_3, vdf_color_unbounded_mix_4`
475+
- `vdf_color_unbounded_mix_1, vdf_color_unbounded_mix_2, vdf_color_unbounded_mix_3, vdf_color_unbounded_mix_4`
476476

477477
depending of their number and types of parameters before rule
478478
application and back afterwards. That means that rules can only match
@@ -491,7 +491,7 @@ The mixer call transformation in the rule engine also applies some
491491
normalization to the calls. Since the order of parameters for these
492492
functions does not matter, the pairs of weights and DFs are sorted by
493493
the semantics of the argument DFs. DF semantics are represented by
494-
the `mi::mdl::IDefinition::Semantics` enumeration in the MDL-SDK and
494+
the `mi::mdl::IDefinition::Semantics` enumeration in the MDL SDK and
495495
the calls in mixer calls are ordered according to the the numerical
496496
values of the C++ enum variants.
497497

examples/mdl/nvidia/sdk_examples/tutorials_aov.mdl

-6
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,3 @@ export aov_material merge5(
161161
example: (1.0f - mix) * a.example + mix * b2.example,
162162
magic: int(math::lerp(float(a.magic), float(b2.magic), mix))
163163
);
164-
165-
// Example of an empty material.
166-
// FIXME: assertion fails.
167-
export struct empty_material in material_category {
168-
};
169-
export empty_material empty() = empty_material();

examples/mdl_core/calls/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ create_from_base_preset(
4242
OUTPUT_NAME "calls"
4343
SOURCES ${PROJECT_SOURCES}
4444
EXAMPLE
45+
STATIC_MSVC_RUNTIME
4546
)
4647

4748
# add dependencies

examples/mdl_core/code_gen/example_code_gen.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ int MAIN_UTF8(int argc, char* argv[])
370370
options.print_usage(std::cout);
371371
exit(EXIT_FAILURE);
372372
}
373-
373+
374374
// Print description of command line options
375375
if (options.m_help)
376376
{
@@ -440,6 +440,9 @@ code_gen [options] <qualified_material_name>
440440
bool Options::parse(int argc, char* argv[])
441441
{
442442
m_mdl_paths.push_back(get_samples_mdl_root());
443+
const auto& path = get_src_shaders_mdl();
444+
if (path != ".")
445+
m_mdl_paths.push_back(path);
443446

444447
for (int i = 1; i < argc; ++i)
445448
{
@@ -573,4 +576,4 @@ bool Options::parse(int argc, char* argv[])
573576
}
574577
}
575578
return true;
576-
}
579+
}

examples/mdl_core/shared/CMakeLists.txt

+9-7
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ endif()
3939
set(PROJECT_SOURCES
4040
"example_cuda_shared.h"
4141
"example_shared.h"
42+
"example_shared.cpp"
4243
"example_shared_backends.h"
4344
"texture_support_cuda.h"
4445
${DUMMY_CPP}
@@ -51,25 +52,26 @@ create_from_base_preset(
5152
OUTPUT_NAME "shared"
5253
SOURCES ${PROJECT_SOURCES}
5354
EXAMPLE
55+
STATIC_MSVC_RUNTIME
5456
)
5557
add_library(mdl_core::shared ALIAS ${PROJECT_NAME})
5658

5759
# inject the MDL_SAMPLES_ROOT path
58-
target_compile_definitions(${PROJECT_NAME}
59-
PUBLIC
60+
target_compile_definitions(${PROJECT_NAME}
61+
PRIVATE
6062
"MDL_SAMPLES_ROOT=\"${CMAKE_CURRENT_SOURCE_DIR}/../..\""
6163
)
6264

6365
# add dependencies
64-
target_add_dependencies(TARGET ${PROJECT_NAME}
65-
DEPENDS
66-
mdl::mdl_core
67-
NO_RUNTIME_COPY # header only -> the consumer will also add this dependency
66+
target_add_dependencies(TARGET ${PROJECT_NAME}
67+
DEPENDS
68+
mdl::mdl_core
69+
NO_RUNTIME_COPY
6870
)
6971

7072
# add include directories
7173
target_include_directories(${PROJECT_NAME}
7274
INTERFACE
7375
# the template makes non public headers private by default
74-
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
76+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
7577
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/******************************************************************************
2+
* Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
3+
*
4+
* Redistribution and use in source and binary forms, with or without
5+
* modification, are permitted provided that the following conditions
6+
* are met:
7+
* * Redistributions of source code must retain the above copyright
8+
* notice, this list of conditions and the following disclaimer.
9+
* * Redistributions in binary form must reproduce the above copyright
10+
* notice, this list of conditions and the following disclaimer in the
11+
* documentation and/or other materials provided with the distribution.
12+
* * Neither the name of NVIDIA CORPORATION nor the names of its
13+
* contributors may be used to endorse or promote products derived
14+
* from this software without specific prior written permission.
15+
*
16+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
17+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19+
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20+
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22+
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23+
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24+
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
*****************************************************************************/
28+
29+
// examples/mdl_core/shared/example_shared.cpp
30+
//
31+
// Code shared by all examples
32+
33+
#include "example_shared.h"
34+
35+
void* g_dso_handle = 0;
36+
37+
// Intentionally not implemented inline which would require callers to define MDL_SAMPLES_ROOT.
38+
std::string get_samples_root()
39+
{
40+
std::string path = get_environment("MDL_SAMPLES_ROOT");
41+
if (path.empty()) {
42+
#ifdef MDL_SAMPLES_ROOT
43+
path = MDL_SAMPLES_ROOT;
44+
#else
45+
path = ".";
46+
#endif
47+
}
48+
49+
if (dir_exists(path.c_str()))
50+
return path;
51+
52+
return ".";
53+
}
54+
55+
// Intentionally not implemented inline which would require callers to define MDL_SRC_SHADERS_MDL.
56+
std::string get_src_shaders_mdl()
57+
{
58+
std::string path = get_environment("MDL_SRC_SHADERS_MDL");
59+
if (path.empty()) {
60+
#ifdef MDL_SRC_SHADERS_MDL
61+
path = MDL_SRC_SHADERS_MDL;
62+
#else
63+
path = ".";
64+
#endif
65+
}
66+
67+
if (dir_exists(path.c_str()))
68+
return path;
69+
70+
return ".";
71+
}

0 commit comments

Comments
 (0)