Skip to content

OSL 1.11.7.3

Compare
Choose a tag to compare
@lgritz lgritz released this 01 Sep 19:13

Release 1.11 -- 1 Sept 2020 (compared to 1.10)

ASWF adoption changes:

  • GOVERNANCE.md and ASWF/Technical-Charter.md document the project
    governance and how the Technical Steering Committee works. An archive of
    meeting minutes can be found in ASWF/meetings. #1137 (1.11.5)
  • All the copyright notices now read "Copyright Contributors to the Open
    Shading Language Project," all files now have proper SPDX identifiers
    instead of long boilerplate notices, and 3rd party included code now has
    its licenses documented in the LICENSE-THIRD-PARTY.md file. #1145 (1.11.5)
  • The official mail list has switched to https://lists.aswf.io/g/osl-dev
    #1167

Dependency and standards changes:

  • LLVM 7.0-10.0: Support for LLVM 4, 5, and 6 have been dropped. Support
    for LLVM 8, 9, and 10 have been added. Note that using LLVM 10 requires
    building for C++14 or later, because LLVM 10's APIs no longer support
    C++11. #981 #1046 #1058 #1128 #1152 #1162 #1206
  • OpenImageIO 2.0-2.2: Support for OIIO 1.8 has been dropped; a minimum of
    OIIO 2.0 is needed to build OSL. (Additionally, a minimum of OIIO 2.1 is
    strongly recommended for anyone using the SIMD batch shading mode.) #1038
    (1.11.0)
  • CMake minimum is now 3.12. #1072 (1.11.1)

OSL Language and oslc compiler:

  • New syntax to reference color and point/vector/normal components as
    named struct components, such as C.r, C.g, C.b, or P.x, P.y, P.z.
    #1049 (1.11.0)
  • oslc compilation speed-ups with faster retrieval of source lines when
    pasted into oso output. #938 (1.11.0)
  • Writing to function parameters not marked as output was only
    recently properly recognized as an error (it was documented as illegal
    all along). Now we demote to a warning, treating it as a full error was
    too disruptive. #944 (1.10.3/1.11.0)
  • Improve oso output efficiency. #938 (1.10.3/1.11.0)
  • Fix bug related to counting the proper number of values used for
    array default value initialization. #948 (1.10.3/1.11.0)
  • Slight modification to the formatting of floating point values in the oso
    to ensure full precision preservation for float values. #949 (1.10.3/1.11.0)
  • Fix crash when encountering empty-expression for (;;). #951 (1.10.3/1.11.0)
  • Fix bug in code generation of certain while loops that directly
    tested a variable as a zero/nonzero test, such as:
        i = 3;
        while (i)
            --i;
    
    whereas the following had worked (they should have been identical):
        i = 3;
        while (i != 0)
            --i;
    
    #947 (1.10.3/1.11.0)
  • Improve warnings about ill-advised use of the comma operator.
    #978 (1.10.4/1.11.0)
  • Fix an assertion/crash when passing initialization-lists as parameters to
    a function, where the function argument expected was as array. #983
    (1.10.4/1.11.0)
  • Fix an assertion/crash for certain type constructors of structs, where the
    struct name was not declared. (This is an incorrect shader, but of course
    should have issued an error, not crashed.) #988 (1.10.4/1.11.0)
  • Improve oslc type error detection for variable declarations with init
    expressions. Note that this may flag some warnings and errors that went
    undetected before, involving initialization assignments of incompatible
    types. #991, #993 (1.10.5/1.11.0)
  • Allow shader parameters with empty brace initializers, such as:
        shader foo ( float myarray[] = {} )
    
    Un-lengthed arrays, if they aren't connected or given a concrete instance
    value, still default to length 1 (we don't allow 0-length arrays, that's a
    whole other can of worms), but this is now treated as equivalent to
    = { default_value } (0 for int or float, "" for string). #967 (1.11.0)
  • More correct handling of escaped string literals (such as "\tfoo\n")
    in string and also in string metadata. #1073 (1.11.1)
  • New command line argument oslc --embed-source embeds the preprocessed
    source code in the .oso file itself (helpful for certain debugging
    situations). #1081 (1.11.3)
  • oslc can generate dependency files, honoring the -M, -MM, -MD, -MMD, -MF,
    and -MT flags with similar meanings to gcc and clang. #1085 #1107 (1.11.3)
    Example:
        $ oslc -MMD test.osl
        Compiled test.osl -> test.oso
        $ cat test.d
        test.oso: test.osl \
            dist/macosx/share/OSL/shaders/color2.h \
            dist/macosx/share/OSL/shaders/stdosl.h
    
  • New shader-level metadata: [[ int range_checking=0 ]] disables the
    automatic generation of range checking code for the shader. #1112 (1.11.4)
  • Support has been added for pointcloud_get() to be able to retrieve
    per-point string data from point clouds. #1157 (1.11.5)
  • Shader output parameters that are marked [[ int lockgeom=1 ]] will
    automatically bind to any identically-named userdata, just like non-output
    parameters have always done. #1200 (1.11.6)

OSL Standard library:

  • Extend linearstep() and smooth_linearstep() to work with color, point,
    vector, and normal types (previously restricted to float). #994
    (1.10.5/1.11.0)
  • Extend transformc() to understand translating between linear and sRGB
    color spaces. #1013 (1.11.0)
  • cbrt() cube root was added to the standard library. #1164 #1166 (1.11.6)

API changes, new options, new ShadingSystem features (for renderer writers):

  • ShadingSystem::convert_value() will now allow promotion of int or
    float to float[4]. #940 (1.11.0)
  • Removed the varieties of RendererServices::texture(), texture3d(), and
    environment() that lack the errormessage parameter and had been marked
    as deprecated since OSL 1.8. #945 (1.11.0)
  • Deprecate the auto-allocation of contexts and per-thread-info. Certain
    calls that took a Context* pointer that were allowed to be NULL now
    by convention require the renderer to pass a valid context. #958 (1.11.0)
  • ShadingSystem: thread-safe/reentrant shader specification via new
    varieties of Parameter(), Shader(), ConnectShaders(), and
    ShaderGroupEnd() that take an explicit ShaderGroup reference and are
    therefore "stateless" and thread-safe. If you exclusively use these new
    methods for shader specification, it's possible for multiple threads to
    specify shader groups simultaneously. #984, #985, #986, #1000 (1.11.0)
    #1067 (1.11.1)
  • New ShadingSystem options:
    • "opt_warnings" enables warnings about things that couldn't be
      optimized and may be performance issues. #1010 (1.11.0)
    • "gpu_opt_error" enables full error status of the subset of those
      warnings that are also hard no-go's when executing on GPUs. #1010
      (1.11.0)
    • "lazyerror", if set to 0, will unconditionally (and non-lazily) run
      any shader layers that still contain error() calls after
      optimization, so that error messages can't be elided by optimizations
      causing the layer to be eliminated or never run. When "opt_warnings"
      is enabled, warnings will be issued about shaders that couldn't
      optimize away all of their error calls. Note that the default value is
      1, giving the old behavior or lazily evaluating shader layers that
      contain error calls. #1191 (1.11.5)
  • RendererServices::get_texture_handle() has changed slightly to require
    a ShadingConntext* parameter, and get_texture_info() has changed to
    have a parameter allowing the caller to provide a texture_thread_info
    handle and a context, as well as to provide a pointer to a ustring where
    error messages should be placed. #1033 (1.11.0)
  • The LLVM JIT optimization level (controlled by the llvm_optimize shading
    system attribute) now defaults to 1, not 0. That should be the best
    performance while still having reasonable JIT times. #1114 (1.11.4)
  • We no longer automatically build the MaterialX shaders (you need to set
    build option OSL_BUILD_MATERIALX to ON). This will eventually be deprecated
    entirely. #1136 (1.11.5)
  • Helper varieties of ShadingSystem::Parameter() and ReParameter() that
    handle the common cases of a single float, int, or string. #1195 #1196
    (1.11.6)
  • ShaingSystem::optimize_group() now takes an optional parameter that
    allows the caller to only do the optimize step without the JIT step.
    #1226 (1.11.71)

Continued work on experimental SIMD batched shading mode:

  • Continued work on SIMD-friendly math and noise: #1108 (1.11.4)
  • Support in LLVM_Util for various wide (SIMD) data types. #1175 (1.11.6)

Continued work on experimental OptiX rendering:

  • Build option USE_OPTIX=1 enable experimental OptiX support.
  • testshade and testrender now take --optix flags to run tests on OptiX.
    You can also force either to run in OptiX mode with environment variable
    TESTSHADE_OPTIX=1. #996 #1001 #1003
  • Various fixes to how strings are represented on the Cuda side. #973 (1.11.0)
  • More complete support of all the noise varieties. #980 (1.11.0)
  • Got spline() function working. #974 #1011 (1.11.0)
  • Work towards getting texture calls working. #974 (1.11.0)
  • printf works for multiple values. #1007 (1.11.0)
  • Work on color-related functions. #1012 (1.11.0)
  • Support for native OSL closures. #1028 #1029 (1.11.0)
  • Work on matrix ops. #1054 (1.11.1)
  • Allow init ops. #1059 (1.11.1)
  • Fixes to string closure params. #1061 (1.11.1)
  • Add support for OptiX 7 #1111 #1203 (1.11.6)

Performance improvements:

  • Constant fold array accesses even if they are out of bounds. #1035 (1.11.0)
  • Speed up the concat() OSL function, the new implementation is very
    careful to avoid extra copies and unnecessary allocations. #1104,#1105
    (1.11.3)
  • Shader performance improved slightly by better inlining during the JIT.
    #1114 (1.11.4)
  • Range checking of matrix component access is skipped for certain cases
    where it was unnecessary. #1174 (1.11.6)
  • LLVM JIT+optimize time has been sped up around 10% by doing a better job
    of pruning unused functions and symbols in the generated module. #1172
    (1.11.6)
  • ShadingSystem::symbol_address() no longer checks for the symbol to be
    NULL (though it will assert on a debug build). #1237 (1.11.7.1)

Bug fixes and other improvements (internals):

  • Fix bug in implementation of splineinverse() when computing with
    Bezier interpolation. #954 (1.10.3/1.11.0)
  • Fix bug in implementation of transformc when relyin on OpenColorIO for
    color transformation math, in cases were derivatives were needed (this
    is a rare case probably nobody ran into). #960 (1.10.3/1.11.0)
  • Improve thread-safety of the OSLCompiler itself, in case an app wants
    to be compiling several shaders to oso concurrently by different threads.
    #953 (1.10.3/1.11.0)
  • LPEs: forbid LPE repetitions inside groups. #972 (1.10.4/1.11.0)
  • Improve error detection and messages for badly formed serialized shaders.
    #1026 (1.11.0)
  • Fix OSLQuery::init() return value, which was false when it should have
    been true. #1030 (1.11.0)
  • Change the way oslc frees long chaines of nodes, which fixes a possible
    stack overflow crash for extremely complicated parse trees. #1031 (1.11.0)
  • Properly respect the lockgeom default when building a shading group
    from serialized commands. #1032 (1.11.0)
  • Fix runtime crash when optional texture argument "missingalpha" was used.
    #1044 (1.11.0)
  • Fix the implementation of division-with-derivs so that the main value
    always exactly matches the results of division of values without derivs.
    Previously there could be some LSB differences. #1066 (1.11.1)
  • Fix a number of places that weren't properly "locale-independent".
    #1075 (1.11.1)
  • Bug fix: fix bug/assertion in cases where layer merging tried to combine
    layers that were "entry layers." #1103 (1.11.3)
  • Fix Windows bug where stdosl.h would not be found properly if oslc.exe
    was in a file path containing a directory name starting with "n". (Because
    of interplay between Windows use of backslash for directory separtors and
    C/C++/OSL use of backslash as escape sequences in strings.) #1101 (1.11.3)
  • Remove the internal attribute query cache, in practice it seemed to be
    slowing things down. #1109 (1.11.4)
  • debug_nan and debug_uninit work more accurately for matrices --
    fewer false positives. #1174 (1.11.6)
  • Fix bug that sometimes caused the optimizer to misunderstand which
    arguments to regex_search and regex_match were written. #1186 (1.11.6)

Internals/developer concerns:

  • Switch much of the internals where we do string formatting using printf-like
    conventions to errorf(), etc., naming convention, reserving the non-f
    names for future use with C++20 std::format/python conventions. #1076
    (1.11.3)
  • Remove pointless assertions from the TypeSpec class. #1079
  • Assertion overhaul: use OSL_ASSERT/OSL_DASSERT instead of borrowing from
    OIIO's dassert.h. Note that OSL_ASSERT always tests, prints error if the
    test fails, but then only aborts for debug builds (no abort for release
    builds). In contrast, OSL_DASSERT does all for debug builds, and none
    (not even the test) for release builds. #1080 #1087 (1.11.3)
  • Refactor the implementation of the Dual template to support more
    efficient code generation when used in vectorized loops (this will be
    important for the upcoming batch shading extensions). #1088 (1.11.3)
  • Refactor of much of the Imath replicated code to support better code
    generation when used in vectorized loops. #1096 (1.11.3)
  • Refactor oslconfig.h, split all the compiler/C++version detection and
    differing macros into platform.h. #1102 (1.11.3)
  • Certain runtime error messages have been improved by demangling the names
    of involved variables and their scopes. #1179 (1.11.6)
  • LLVM now JITs code for the specific host architecture. #1182 (1.11.6)
  • Change all bare std::ofstream and ifstream to OIIO::ofstream/ifstream.
    This ensures that they are UTF-8 safe and compile properly on MINGW.
    #1188 (1.11.6)

Build & test system improvements:

  • Major overhaul of the CMake build system to upgrade minimum of CMake 3.12
    and us many features that this makes available. #1072 #1074 #1143
    (1.11.1+)
    Highlights:
    • All optional dependencies (e.g. "Pkg") now can be disabled (even if
      found) with cmake -DUSE_PKG=0 or environment variable USE_PKG=0.
      Previously, some packages supported this, others did not.
    • All dependencies can be given find hints via -DPkg_ROOT=path or by
      setting environment variable Pkg_ROOT=path. Previously, some did, some
      didn't, and the ones that did had totally inconsistent names for the
      path hint variable (PKG_HOME, PKG_ROOT_DIR, PKG_PATH, etc).
    • Nice color coded status messages making it much more clear which
      dependencies were found, which were not, which were disabled.
    • Use standard BUILD_SHARED_LIBS to control shared vs static libraries,
      replacing the old nonstandard BUILDSTATIC name.
    • Use correct PUBLIC/PRIVATE marks with target_link_libraries and
      target_include_directories, and rely on cmake properly understanding
      the transitive dependencies.
    • CMAKE_DEBUG_POSTFIX adds an optional suffix to debug libraries.
    • CMAKE_CXX_STANDARD to control C++ standard (instead of our nonstandard
      USE_CPP).
    • CXX_VISIBILITY_PRESET controls symbol visibility defaults now, not
      our nonstandard HIDE_SYMBOLS. And the default is to keep everything
      hidden that is not part of the public API.
    • The ENABLERTTI build option has been renamed ENABLE_RTTI.
    • Config based install and usage.
  • testshade:
    • Make sure that no unreported errors accumulated in the texture system
      or image cache. #939 (1.11.0)
    • Check that no leftover errors are in the TextureSystem or ImageCache
      at the end of the test (that would indicate that someplace in OSL we
      are failing to check texture errors). #939 (1.10.3/1.11.0)
    • testshade -o : now null as the filename will not produce any
      output. This is handy to mark a renderer output but without storing
      the results as an image. #1193 (1.11.6)
    • --vary_pdxdy, --vary_udxdy and --vary_vdxdy allow a way to
      force P, u, v to have varying derivatives (for testing purposes).
      #1227 (1.11.7.1)
  • Supporting dependencies:
    • Build script finding of LLVM is now more robust to certain library
      configurations of llvm, particularly where everything is bundled in
      just one libLLVM without a separate libLLVMMCJIT. #976 (1.10.4/1.11.0)
    • Support for LLVM 4 has been dropped. #981 (1.11.0)
    • Simplified finding of flex/bison, rely more on CMake's built-in
      flex/bison find packages. #977 (1.11.0)
    • Verified that OSL can be built with Clang 8 and LLVM 8.0.
    • When building against recent OIIO versions whose Sysutil supports
      stack dumps, crashes in the command line tools (including testshade)
      will print stack traces to aid debugging. #1019 (1.11.0)
    • Improve finding of OpenEXR/IlmBase. #1022 (1.11.0)
    • Fix problems when building against Qt 5.13 due to deprecated calls.
      #1043 (1.11.0)
    • Fixes for CI when using OIIO 2.1 master that has changed its own cmake
      minimum to 3.12. #1065 (1.11.1)
    • Improvement for how the build system figures out which LLVM static
      libraries are needed. #1070 (1.11.1)
    • Improvements in finding Partio. #1125 (1.11.5)
    • Fixes to support Qt 5.15 (currently, osltoy is the only component that
      uses Qt). #1204 (1.11.6)
    • Better able to find LLVM when the system installation of LLVM has its
      llvm-config named llvm-config-64. #1238 (1.11.7.1)
    • Fixes for OIIO 2.2 which has eliminated use of tinyformat in favor of
      always relying on fmtlib. #1242 (1.11.7.1)
    • Address problem with LLVM 10.0.1 on Mac when installed by Homebrew.
      #1245 (1.11.7.2)
  • A new build-time CMake variable OSL_LIBNAME_SUFFIX lets you optionally
    add a custom suffix to the main libraries that are built. (Use with
    caution.) #970 (1.11.0)
  • Add a build-time option GLIBCXX_USE_CXX11_ABI to force the "new/old string
    ABI" to something other than the default for your version of gcc. #995
    (1.10.5/1.11.0)
  • stdosl.h and shaders are now installed in PREFIX/share/OSL/shaders. This
    should not need any changes to shaders, oslc will know where to find them.
    The location can be overridden by build-time option OSL_SHADER_INSTALL_DIR.
    #956 (1.10.0)
  • When OptiX mode is enabled (USE_OPTIX=1), the testsuite will some tests in
    an additional time forcing OptiX mode: any test containing a file named
    OPTIX in its test directory; or all tests if environment variable
    TESTSUITE_OPTIX=1 (except tests that contain a file named NOOPTIX in
    their directory. #1004 (1.10.0)
  • Allow OSL to build with USE_LLVM_BITCODE enabled on Windows. #998 (1.10.0)
  • Various Windows compilation improvements. #1017 #1020
  • Fix signed/unsigned comparison warnings. #1037 (1.11.0)
  • Fixes for MinGW compiler on Windows. #1047 #1048 (1.11.0)
  • Scripts and tests utilizing Python have all been visited to make sure they
    are compatible with both Python 2.x and Python 3.x. #1071 (1.11.1)
  • Build: on OSX, better logic about the OIIO plugin must be built as a
    module or as a shared library. #1078 (1.11.3/1.10.8)
  • Removed support for Boost Wave for preprocessing osl input. We now always
    use clang library components for preprocessing. #1089 (1.11.3)
  • Add an optional build-time EXTRA_WARNINGS option (default: OFF) that
    enables even more picky than usual warnings. Fix many warnings that cropped
    up during testing, mostly related to unused function paramters. #1106 (1.11.3)
  • The testsuite can run in parallel, with a number of threads set by the
    environment variable CTEST_PARALLEL_LEVEL. #1119 (1.11.4)
  • oslconfig.h is now generated by a cmake configure_file step, from
    oslconfig.h.in. #1141 (1.11.5)
  • Use ASWF docker images to speed up many of the CI matrix entries, as well
    as to exactly test several VFX Platform specs. #1169 (1.11.6)
  • Fix typo that botched the version in the .pc pkgconfig file. #1168 (1.11.6)
  • CI test against gcc9 and gcc10. #1192 (1.11.6)
  • Propagate RTTI compile options to exported cmake config. #1194 (1.11.6)
  • New file .git-blame-ignore-revs lists the hashes of commits that only
    performed bulk reformatting, so that they don't misattribute authorship
    or modification date. Everybody do this in your local repo:
    git config blame.ignoreRevsFile .git-blame-ignore-revs
    #1244 (1.11.7.2)

Documentation:

  • Make it clear that the documentation is licensed under the CC-BY-4.0
    license.
  • testsuite/example-deformer contains an example of using OSL on a
    collection of points in a manner that you might use to implement a
    deformer. #1199 (1.11.6)
  • testrender now contains a progressive sampler, which might be a good
    example for others writing renderers. #1202 (1.11.6)
  • Fix incorrect descripton in spline() regarding the number of spline
    values required for each interpolation type. #1239 (1.11.7.1)
  • Extensive fixing of typos and misspellings in docs and comments. #1243
    (1.11.7.2)
  • Renamed "LICENSE-THIRD-PARTY.md" to "THIRD-PARTY.md" to avoid confusing
    GitHub's reporting of the project's license. (1.11.7.2)