diff --git a/CHANGELOG.md b/CHANGELOG.md index 54693b04a..f196c7c82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,39 @@ Change Log ========== -MDL SDK 2021.0.2 (344800.7839): 07 Oct 2021 +MDL SDK 2021.0.4 (344800.9767): 26 Nov 2021 ----------------------------------------------- +ABI compatible with the MDL SDK 2021.0.4 (344800.9767) binary release +(see [https://developer.nvidia.com/mdl-sdk](https://developer.nvidia.com/mdl-sdk)) + +**Fixed Bugs** + +- General + + - Fixed incorrect handling of user-defined type names for structs and enums + when encoded names were enabled. + +- MDL Compiler and Backends + + - Fixed non-deterministic behavior with `sincos` calls. + + +MDL SDK 2021.0.3 (344800.8726): 02 Nov 2021 +------------------------------------------- + +ABI compatible with the MDL SDK 2021.0.3 (344800.8726) binary release +(see [https://developer.nvidia.com/mdl-sdk](https://developer.nvidia.com/mdl-sdk)) + +**Fixed Bugs** + +- MDL Compiler and Backends + + - Apply thin film only if thickness > 0.0 (libbsdf). + + +MDL SDK 2021.0.2 (344800.7839): 07 Oct 2021 +------------------------------------------- + ABI compatible with the MDL SDK 2021.0.2 (344800.7839) binary release (see [https://developer.nvidia.com/mdl-sdk](https://developer.nvidia.com/mdl-sdk)) diff --git a/doc/base_module/index.html b/doc/base_module/index.html index a3fa65833..2276aa9ed 100644 --- a/doc/base_module/index.html +++ b/doc/base_module/index.html @@ -155,7 +155,7 @@

Edge

-7 October 2021, 20:12, rev.344800.7839 +24 November 2021, 20:20, rev.344800.9767 © 2021 NVIDIA Corporation. All rights reserved. diff --git a/doc/build/doxygen_footer_1_8_4.html b/doc/build/doxygen_footer_1_8_4.html index 737f5eb04..6de410e7a 100644 --- a/doc/build/doxygen_footer_1_8_4.html +++ b/doc/build/doxygen_footer_1_8_4.html @@ -2,7 +2,7 @@
- MDL SDK 2021.0.2 (344800.7839): 07 Oct 2021 + MDL SDK 2021.0.4 (344800.9767): 26 Nov 2021 diff --git a/include/mi/neuraylib/version.h b/include/mi/neuraylib/version.h index 4506fb536..6ec205687 100644 --- a/include/mi/neuraylib/version.h +++ b/include/mi/neuraylib/version.h @@ -95,7 +95,7 @@ #endif // MI_NEURAYLIB_VERSION_QUALIFIER_EMPTY /// \NeurayProductName product version number in a string representation, such as \c "2.0". -#define MI_NEURAYLIB_PRODUCT_VERSION_STRING "2021.0.2" +#define MI_NEURAYLIB_PRODUCT_VERSION_STRING "2021.0.4" /// Type of plugins for the \NeurayApiName. /// \see #mi::base::Plugin::get_type(). diff --git a/src/base/system/version/version.h b/src/base/system/version/version.h index fb9b639e3..50cb252e7 100644 --- a/src/base/system/version/version.h +++ b/src/base/system/version/version.h @@ -1,15 +1,15 @@ /* Globally unique version identifier string. */ -#define MI_VERSION_STRING "344800.7839" +#define MI_VERSION_STRING "344800.9767" /* Version identifier for use in Windows resource compiler scripts (4 x 16bits) */ -#define MI_VERSION_CSV 34,4800,7839,0 +#define MI_VERSION_CSV 34,4800,9767,0 /* Alternate version identifier for compatibility with existing mill builds */ -#define MI_VERSION_CSV_BIG 34480,0,7839,0 +#define MI_VERSION_CSV_BIG 34480,0,9767,0 /* Numeric version identifier, meaningful only in the context of this branch. */ -#define MI_BUILD_NUMBER 7839 +#define MI_BUILD_NUMBER 9767 /* Global numeric version identifier */ -#define MI_BUILD_NUMBER_FULL 352639 +#define MI_BUILD_NUMBER_FULL 354567 -#define MI_DATE_STRING "07 Oct 2021" +#define MI_DATE_STRING "26 Nov 2021" diff --git a/src/io/scene/mdl_elements/mdl_elements_utilities.cpp b/src/io/scene/mdl_elements/mdl_elements_utilities.cpp index 8d321083b..9fe408d83 100644 --- a/src/io/scene/mdl_elements/mdl_elements_utilities.cpp +++ b/src/io/scene/mdl_elements/mdl_elements_utilities.cpp @@ -4736,17 +4736,18 @@ const mi::mdl::IType* int_type_to_mdl_type( return nullptr; } - if (mi::mdl::IType_enum const *te = tf.lookup_enum(int_enum_type->get_symbol())) { - // an enum with this name already exists, assume it's the right one + // If an enum with this name already exists, assume it is the right one. + const char* int_type_name = int_enum_type->get_symbol(); + std::string core_type_name = decode_name_without_signature( int_type_name); + if( const mi::mdl::IType_enum* te = tf.lookup_enum( core_type_name.c_str())) return te; - } - - const mi::mdl::ISymbol *s = symtab->create_symbol(int_enum_type->get_symbol()); - mi::mdl::IType_enum* te = tf.create_enum(s); - for (mi::Size i = 0, n = int_enum_type->get_size(); i < n; ++i) { - const mi::mdl::ISymbol *evs = symtab->create_symbol(int_enum_type->get_value_name(i)); - te->add_value(evs, int_enum_type->get_value_code(i)); + // Otherwise create it. + const mi::mdl::ISymbol* s = symtab->create_symbol( core_type_name.c_str()); + mi::mdl::IType_enum* te = tf.create_enum( s); + for( mi::Size i = 0, n = int_enum_type->get_size(); i < n; ++i) { + const mi::mdl::ISymbol* evs = symtab->create_symbol( int_enum_type->get_value_name( i)); + te->add_value( evs, int_enum_type->get_value_code( i)); } return te; } @@ -4789,22 +4790,21 @@ const mi::mdl::IType* int_type_to_mdl_type( return nullptr; } - if (mi::mdl::IType_struct const *st = tf.lookup_struct(int_struct_type->get_symbol())) { - // an struct with this name already exists, assume it's the right one - return st; - } - - const mi::mdl::ISymbol *s = symtab->create_symbol(int_struct_type->get_symbol()); - - mi::mdl::IType_struct* st = tf.create_struct(s); - for (mi::Size i = 0, n = int_struct_type->get_size(); i < n; ++i) { - - mi::base::Handle field(int_struct_type->get_field_type(i)); - const mi::mdl::ISymbol *fs = symtab->create_symbol(int_struct_type->get_field_name(i)); + // If a struct with this name already exists, assume it is the right one. + const char* int_type_name = int_struct_type->get_symbol(); + std::string core_type_name = decode_name_without_signature( int_type_name); + if( const mi::mdl::IType_struct* ts = tf.lookup_struct( core_type_name.c_str())) + return ts; - st->add_field(int_type_to_mdl_type(field.get(), tf), fs); + // Otherwise create it. + const mi::mdl::ISymbol* s = symtab->create_symbol( core_type_name.c_str()); + mi::mdl::IType_struct* ts = tf.create_struct( s); + for( mi::Size i = 0, n = int_struct_type->get_size(); i < n; ++i) { + mi::base::Handle field( int_struct_type->get_field_type( i)); + const mi::mdl::ISymbol* fs = symtab->create_symbol( int_struct_type->get_field_name( i)); + ts->add_field( int_type_to_mdl_type( field.get(), tf), fs); } - return st; + return ts; } case IType::TK_BOOL: return tf.create_bool(); diff --git a/src/mdl/jit/generator_jit/gen_intrinsic_func.py b/src/mdl/jit/generator_jit/gen_intrinsic_func.py index aa3ff8db3..879284457 100644 --- a/src/mdl/jit/generator_jit/gen_intrinsic_func.py +++ b/src/mdl/jit/generator_jit/gen_intrinsic_func.py @@ -6274,9 +6274,9 @@ def finalize(self): self.add_class_member("mi::mdl::IAllocator *", "m_alloc", "The allocator.", True) self.add_class_member("LLVM_code_generator &", "m_code_gen", "The code generator.", True) self.add_class_member("LLVM_code_generator::Target_language", "m_target_lang", "The target language.", True) - self.add_class_member("bool", "m_fast_math", "True if fast-math is enabled.", True) - self.add_class_member("bool", "m_has_sincosf", "True if destination has sincosf.", True) - self.add_class_member("bool", "m_has_res_handler", "True if a resource handler I/F is available.", True) + self.add_class_member("bool const", "m_fast_math", "True if fast-math is enabled.", True) + self.add_class_member("bool const", "m_has_sincosf", "True if destination has sincosf.", True) + self.add_class_member("bool const", "m_has_res_handler", "True if a resource handler I/F is available.", True) self.add_class_member("bool", "m_use_user_state_module", "True if user-defined state module functions should be used.", False) self.add_class_member("int", "m_internal_space", "The internal_space encoding.", True) self.add_class_member("llvm::Function *", "m_runtime_funcs[RT_LAST + 1]", "Runtime functions.", False) diff --git a/src/mdl/jit/generator_jit/generator_jit_llvm.cpp b/src/mdl/jit/generator_jit/generator_jit_llvm.cpp index 45cf9374c..77edffaf4 100644 --- a/src/mdl/jit/generator_jit/generator_jit_llvm.cpp +++ b/src/mdl/jit/generator_jit/generator_jit_llvm.cpp @@ -1109,6 +1109,7 @@ LLVM_code_generator::LLVM_code_generator( , m_use_renderer_adapt_normal(options.get_bool_option( MDL_JIT_OPTION_USE_RENDERER_ADAPT_NORMAL)) , m_in_intrinsic_generator(false) +, m_target_lang(target_lang) , m_runtime(create_mdl_runtime( m_arena_builder, this, @@ -1189,7 +1190,6 @@ LLVM_code_generator::LLVM_code_generator( , m_sm_version(target_lang == TL_PTX ? sm_version : 0) , m_min_ptx_version(0) , m_state_usage_analysis(*this) -, m_target_lang(target_lang) , m_enable_full_debug(enable_debug) , m_enable_type_debug(target_lang == TL_HLSL) , m_exported_funcs_are_entries(false) diff --git a/src/mdl/jit/generator_jit/generator_jit_llvm.h b/src/mdl/jit/generator_jit/generator_jit_llvm.h index bc64d3271..6e1bdd443 100644 --- a/src/mdl/jit/generator_jit/generator_jit_llvm.h +++ b/src/mdl/jit/generator_jit/generator_jit_llvm.h @@ -3425,6 +3425,9 @@ class LLVM_code_generator bool m_in_intrinsic_generator; + /// The target language. + Target_language m_target_lang; + /// The runtime creator. MDL_runtime_creator *m_runtime; @@ -3694,9 +3697,6 @@ class LLVM_code_generator /// Analysis object storing state usage information per function and updating State_usage_analysis m_state_usage_analysis; - /// The target language. - Target_language m_target_lang; - /// If true, generate full debug info. bool m_enable_full_debug;