Skip to content

OSL v1.12.6.2

Compare
Choose a tag to compare
@lgritz lgritz released this 01 Oct 20:14
· 341 commits to main since this release

OSL version 1.12 has been released! Officially tagged as "v1.12.6.2", we have also moved the "release" branch tag to this position. Henceforth, 1.12 is the supported production release family. The API is now frozen -- we promise that subsequent 1.12.x releases (which should happen monthly) will not break back-compatibility of API, ABI, or linkage, compared to this release. Please note that this release is not ABI or link compatible with 1.11 or older releases (and may be incompatible with previous in-progress 1.12 development prior to this release). Release notes for 1.12 outlining all the changes since 1.11 was introduced are below.

Please note that a few of the build and runtime dependencies have changed their minimum supported versions. The minimum C++ standard supported is now C++14 and the minimum supported compilers are gcc 6.1 (no more 4.8) and MSVS 2017 (no more 2015). The minimum LLVM is now 9.0 (no more 7 or 8). The minimum OpenImageIO is now 2.2 (no more support for 2.0 or 2.1), and the minimum OpenEXR is now 2.3 (no more 2.0, 2.1, or 2.2).

Enjoy, and please report any problems. We will continue to make patch releases to the 1.12 family roughly monthly, which will contain bug fixes and non-breaking enhancements. The older 1.11 series of releases is now considered obsolete. There will be no further patches to 1.11.

Release 1.12 -- 1 Oct 2022 (compared to 1.11)

Big Deal Changes:

  • Batch shading: A fully operational "batch shading" support when using
    CPUs supporting the Intel AVX2 or AVX512 instruction set architectures,
    allows shading 8 or 16 points at a time, accelerated by using SIMD
    instructions. (Changes contributed by Intel.)
  • OptiX: A reasonable subset of the OSL language can run on NVIDIA GPUs
    for Cuda or OptiX-based renderers.
  • Standardized material closures: Synchronize with MaterialX on a minimum
    standard set of material closures. This is reflected in both the OSL spec as
    well as reference implementations of those closures in testrender. #1533
    #1536 #1537 #1538 #1539 #1541 #1542 #1547 #1557

Dependency and standards requirements changes:

  • The minimum (and default) compilation mode is now C++14. C++17 and 20 are
    also supported. #1362 #1369 (1.12.2)
  • Minimum compilers are now gcc 6.1 (no more support for gcc 4.8), MSVS
    2017 or newer (no more support for 2015).
  • Minimum LLVM is now 9.0. Support for LLVM 7 and 8 have ben dropped.
    #1441 (1.12.3)
  • Minimum OpenImageIO is now 2.2: Support for OIIO 2.0 and 2.1 have been
    dropped. #1426 (1.12.3)
  • Minimum OpenEXR version is now 2.3 (raised from 2.0). #1406 (1.12.3)

OSL Language and oslc compiler:

  • #pragma error "message" and #pragma warning "message" can be used to
    conditionally inject a compile-time error or warning. #1300 (1.12.1)
  • Check for errors when when writing oso files (for example, disk volume
    full). #1360 (1.12.2/1.11.14)
  • A new flavor of gettextureinfo(texturename, paramname, s, t, destination)
    allows for querying of texture metadata about the particular UDIM tile
    that will be used for particular (s,t) texture coordinates. #1398 (1.12.3)
  • Better error detection when OSL user functions write to function parameters
    that are not marked as output. #1417 (1.12.3)
  • Detect and better error message when using a type name where a variable
    identifier should be. #1457 (1.12.4.2)

OSL Standard library:

  • vector2.h is updated with a mod() function for vector2. #1312 (1.12.1/1.11.12)
  • Preliminary work for adding standard MaterialX closures. 31371 (1.12.2)
  • Fix previously-broken color conversions from RGB to xyY. #1410 (1.12.3)
  • Fully removed MaterialX shaders (get those from the MaterialX project).
    #1450 (1.12.3)
  • Fix incorrect implementation of matrix4 * vector4 in vector4.h #1513
    (1.12.5.0)

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

  • Custom experimental llvm optimization levels 10, 11, 12, and 13. These
    are stripped down versions of 0, 1, 2, 3 (corresponding to clang's -O0,
    -O1, -O2, -O3) but we think for shaders are just as performant but with
    lower JIT time. These are currently experimental, but we are benchmarking
    to determine if they should be the new defaults. #1250 (1.12.0.0)
  • ShadingSystem attribute "searchpath:library" gives a searchpath for finding
    runtime-loadable implementation modules for ISA-optimized operations.
    #1310 (1.12.1)
  • Output variable placement -- now you can designate where shader outputs
    should go and the shader will put results there, instead of the app using
    find_symbol() and symbol_address after the shader is executed. #1328 (1.12.2)
  • Userdata input placement -- now you can designate where interpolated
    userdata should be copied from directly, rather then via callbacks to
    RendererServices::get_userdata(). #1391 (1.12.3)
  • Better hiding of the Matrix22 class, which was never actually part of the
    public APIs. #1480 (1.12.4.5)
  • Add ACES2065-1 and ACEScg as shading system color spaces (#1486) (1.12.4.6)
  • Expanded warnings (via enabling the "opt_warnings" attribute of the
    ShadingSystem) for operations that try to create new strings mid-shader, or
    that need to access the characters of strings mid-shader. These are only
    triggered for those cases that cannot be resolved by the end of the "runtime
    optimization" phase. #1497 (1.12.4.6)

SIMD batched shading mode:

  • Added support for masked operations to LLVMUtil. #1248 #1250 (1.12.0.0)
  • Add interface to ShadingSystem for batched execution. #1272 (1.12.0.1)
  • Add interface to batched RendererServices. #1276 (1.12.0.1)
  • Batched testshade. #1298 (1.12.1)
  • ShadingSystem plumbing to support batched execution. #1301 (1.12.1)
  • Batched analysis to figure out which symbols need to be varying or uniform,
    and which operations require masking. #1313 #1318 #1322 (1.12.1)
  • Additional infrastructure for batched analysis. #1316 (1.12.1)
  • Add implementation for BatchedBackendLLVM. #1330 (1.12.1)
  • ISA-specific modules. #1345 (1.12.2)
  • Introduction of CI testing of batched mode. #1357 #1367 (1.12.2)
  • Control flow and string ops. #1372 (1.12.2)
  • Matrix operations. #1378 (1.12.2) #1485 (1.12.4.6)
  • Batched algebraic, trig, and transcendental functions. #1385 (1.12.2)
  • Batched noise. #1394 (1.12.3)
  • Batched implementation of all color operations. #1408 (1.12.3)
  • Batched bitwise ops. #1413 (1.12.3)
  • Batched spline and spline inverse. #1422 (1.12.3)
  • Batched texture, gettextureinfo, texture3d, environment. #1436 (1.12.3)
  • Batched dictionary functionality (dict_find, etc.) #1445 (1.12.3)
  • Enable batched execution of most testsuite. #1453 (1.12.4.1)
  • Batched isnan, isinf, isfinite. #1456 (1.12.4.2)
  • Batched userdata and output placement. #1455 (1.12.4.2)
  • Batched pointcloud functions. #1464 (1.12.4.4)
  • Batched closures #1500
  • Fix overrunning allocation region in debug common_ancestor_between. #1577
    (1.12.6.1)

OptiX rendering:

  • Explicitly set the OptiX pipeline stack size. #1254 (1.12.0.0)
  • CI tests now at least compile and build with USE_OPTIX=1 (though not yet
    run the tests). #1281 (1.12.0.1)
  • A simple self-contained Cuda/OptiX example has been added as
    testsuite/example-cuda. #1280 (1.12.0.1)
  • Overhaul in how strings are communicated to the GPU side. #1309 (1.12.1)
  • Removal of runtime compilation of Cuda (libnvrtc dependency eliminated).
    #1309 (1.12.1)
  • Fix problems with unresolved symbols on GPU, particularly when multiple
    shaders call certain functions like printf. #1401 (1.12.3)
  • Changed prototype of osl_get_attribute callback to work properly on
    GPU. #1404 (1.12.3)
  • Fix missing hostdevice modifier on some matrix operators. #1409 (1.12.3)
  • Fix race conditions when compiling for OptiX 7. #1411 (1.12.3)
  • osl_get_attribute() uses device strings when compiling for OptiX.
    #1435 (1.12.3)
  • Fix issue with OptiX + clang 14 with duplicate symbols. #1561 (1.12.6.0)

Performance improvements:

  • Less mutex locking around use and retrieval of ColorSystem related to
    doing color transforms. #1405 (1.12.3)
  • Constant folding of startswith(). #1507 (1.12.5.0)

Bug fixes and other improvements (internals):

  • Fix derivatives of texture calls when only derivatives of the "alpha"
    value are needed. #1251 (1.12.0.0)
  • When uninitialized value detection is used, fix possible "false positive"
    related to the condition variable of do-while loops. #1252 (1.12.0.0)
  • Avoid some pointless copies of output variables from a used layer to a
    downstream layer that is known to not be used. #1253 (1.12.0.0)
  • Stats now print more information about build options and runtime hardware
    capabilities. #1258 #1259 (1.12.0.1)
  • The osl and oso parsers are now re-entrant, which allows different threads
    to concurrently compile or load shaders. #969 (1.12.0.1)
  • Fix asymptomatic potential runtime optimizer bug where certain
    multi-component values were not correctly recognized as nonzero. #1266
    (1.12.0.1/1.11.9)
  • Fix optimizer bug where an output parameter that is also marked as
    [[lockgeom=0]], i.e., it gets a value from a userdata input, but also
    passes it to a downstream connection or a renderer output, could end up
    with an incorrect value if it was never read in the shader (including if
    the only times it was read were optimized away). #1295 (1.12.0.1)
  • Ensure that OSLCompiler::LoadMemoryCompiledShader returns false upon parse
    failure. #1302 (1.12.1/1.11.10)
  • During runtime optimization, don't merge layers that produce renderer
    outputs (the semantics of doing so are very fishy). #1296 (1.12.1)
  • Eliminate unnecessary error messages to stderr for broken point clouds.
    #1333 (1.12.1/1.11.13)
  • Fix undefined behavior that could result in crashes that resulted from
    the Symbol class having no virtual destructor. #1397 (1.12.3)
  • Fix in runtime optimizer where tracking of messages and unknown messages
    relied on uninitialized variables. #1447 (1.11.17/1.12.3)
  • Stop internally using OIIO::string_view::c_str(), which will someday be
    removed. #1458 (1.12.4.2)
  • Correctly track that the backfacing() function requires N and I shader
    globals. #1462 (1.12.4.4)
  • Print all 4 levels of version numbers in help messages. #1477 (1.12.4.4)
  • Fix GPU code generation crash. #1479 (1.12.4.4)
  • Work to transition internals to use modern std::format notation for
    formatted output. #1487 #1490 (1.12.4.6) #1504 #1506 (1.12.5.0)
  • testrender improvements:
    • Fix testrender memory error on teardown. #1499 (1.12.4.6)
    • Modernize the sampler in testrender, improving quality and performance.
      #1534 (1.12.6.0)
    • Switch to cone tracing for derivatives. #1543 (1.12.6.0)
  • Fix error that prevented correct typecheck of ternary operator. #1552
    (1.12.6.0)
  • Fix bug where assigning an init-op param its default value as an instance
    value would get lost. #1578 (1.12.6.1)

Internals/developer concerns:

  • Use the final keyword in certain internal classes where applicable.
    #1260 (1.12.0.1/1.11.9)
  • Minor fixes to the internal TypeSpec and Symbol classes. #1267 (1.12.0.1)
  • Switch from deprecated call to OIIO::parallel_image to the new version.
    #1317 (1.11.11/1.12.1)
  • The "archive_groupname" handling is now careful to sanitize the filenames
    it deals with, closing some security and safety holes. #1383 (1.12.2)
  • More migration of string formatting to new std::format style. #1389 (1.12.3)
    #1469 #1470 (1.12.4.4)
  • llvm_util: Switch some uses of ptr+len to span. #1390 (1.12.3)
  • OSL no longer uses sscanf internally (which has icky locale-dependent
    behavior), and instead use locale-independent OIIO::Strutil utilities
    whenever we need to parse strings. #1432 (1.12.3)
  • Avoid use of OIIO::string_view::str() which is not corresponding to the
    official C++17 std::string_view. #1467 (1.12.4.4)
  • Prototype of "free function" approach that will someday mostly supplant
    the way we use RendererServices, and will help to unlock feature completion
    for GPU and other back ends. This experimental feature is not expected
    to be used in OSL 1.12. #1494 (1.12.5.0)
  • Work on gradually converting printf-style formatted strings to fmt /
    std::format style. #1493 (1.12.5.0)
  • LLVM_Util: allow naming of llvm symbols to help with IR debugging. #1530
    (1.12.6.0)
  • clang-format the code base. #1508 #1509 #1511 #1512 #1515 #1518 #1540
    (1.12.5.0) #1555 #1562 #1568 (1.12.6.0)
  • A round of spell-checking all the comments in the code base. #1550
    (1.12.5.0)

Build & test system improvements:

  • CMake build system and scripts:
    • We now use .git-blame-ignore-revs to record commits that consist
      entirely of reformatting, so that 'git blame' does not misattribute
      authorship to the trivial changes of those commits. #1244 (1.12.0.0)
    • Miscellaneous improvements to cmake scripts. #1247 (1.12.0.0)
    • Instead of defaulting to looking for Python 2.7, the OSL build now
      defaults to whatever Python is found (though a specific one can still
      be requested via the PYTHON_VERSION variable). #1249 (1.12.0.0/1.11.8)
      #1286 (1.12.0.1/1.11.9)
    • Extend checked_find_package with VERSION_MIN and VERSION_MAX. #1303
      (1.12.1/1.11.10)
    • Make the CMake build scripts more friendly to being a subproject.
      #1304 #1319 (1.11.11/1.12.1)
    • We weren't properly hiding non-public symbols. #1337 (1.12.1/1.11.12)
    • Fully split oslquery and oslnoise libraries from oslexec, no more
      redundant modules put into both. #1346 #1348 (1.12.1)
    • Support for CMake 3.20 #1354 (1.12.2/1.11.14)
    • Important change to Makefile wrapper: We have a 'Makefile' that just
      wraps cmake for ease of use. This has changed its practice of putting
      builds in build/ARCH to just build (and local installs from
      dist/ARCH to dist) to better match common cmake practice. So where
      your local builds end up may shift a bit. #1396 (1.12.3)
    • Be more careful about not writing over a sensitive install area
      unless CMAKE_INSTALL_PREFIX is explicitly set. #1421 (1.12.3)
    • PROJECT_VERSION_RELEASE_TYPE and OSL_SUPPORTED_RELEASE are now
      cache variables that can have build-time overrides. #1443 (1.12.3)
    • Use PROJECT_IS_TOP_LEVEL (not OSL_IS_SUBPROJECT) to confirm with
      CMake 21 conventions. #1443 (1.12.3)
    • New TIME_COMMANDS option, when enabled, can help debug performance of
      the build. #1443 (1.12.3)
    • New CMake variable DOWNSTREAM_CXX_STANDARD sets the downstream
      minimum C++ requirement, separately from CMAKE_CXX_STANDARD which sets
      what we build OSL itself with. Clarify that currently, OSL can be used
      downstream by C++14, even if it is built with C++17 or higher. #1454
      (1.12.4.1)
    • Make exported cmake configs relocatable by using relative paths. #1466
      (1.12.4.4)
    • Make the version number be a cmake cache variable. #1579 (1.12.6.1)
  • Dependency version support:
    • Build properly against Cuda 11 and OptiX 7.1. #1232 (1.12.0.1)
      and up to OptiX 7.4 #1559 (1.12.6.0)
    • PugiXML build fixes on some systems. #1262 (1.12.0.1/1.11.8)
    • Cuda/OptiX back end: Add __CUDADEVRT_INTERNAL__ define to bitcode
      generation, needed to avoid duplicate cudaMalloc symbols with CUDA9+
      #1271 (1.12.0.1)
    • Build against LLVM 11 #1274 (1.12.0.1), LLVM 12 #1351 (1.12.1.0)
      #1412 (1.12.3), LLVM 13 #1420 (1.12.3), LLVM 14 #1492 (1.12.4.6)
      LLVM 15 #1592 (1.12.6.2)
    • Fix build break against recent OIIO master change where m_mutex field
      was removed from ImageInput. #1281 (1.12.0.1/1.11.9)
    • Work to ensure that OIIO will build correctly against the upcoming
      Imath 3.0 and OpenEXR 3.0. #1299 (1.11.10/1.12.1) #1332 (1.11.11/1.12.1)
      #1341 (1.11.12/1.12.1) #1356 #1368 (1.11.13/1.12.2) #1489 (1.12.4.6)
    • Improved finding of llvm components when using static libraries. #1375
      (1.12.2)
    • No longer use boost regex, completely rely on std::regex now that OSL
      is C++14 minimum. #1377. (1.12.2)
    • Support for OpenImageIO 2.3 changes. #1393 (1.12.3)
    • Some rearrangement of #include and other trickery ensures that OSL
      always includes headers from its favored version of Imath, rather than
      the ones that OIIO prefers (in cases where OIIO and OSL were each based
      on different Imath versions). #1460 (1.12.4.2)
    • Various fixes for functionality and warnings for Intel icc and icx
      compilers. #1459 #1473 #1475. (1.12.4.4)
    • Fixes for recent OIIO TextureSystem changes that hide Imath types.
      #1476 (1.12.4.4)
    • Changes to work correctly with OpenImageIO 2.4 and its master being
      the start of 2.5. #1569 (1.12.6.0)
  • Testing and Continuous integration (CI) systems:
    • Eliminate the old Travis CI and Appveyor. #1334 #1338 (1.12.1)
    • Use ccache + GitHub 'cache' action to greatly speed up CI runs. #1335
      (1.12.1)
    • Divide the CI stages into separate steps, combine dependency-building
      scripts for CentOS and Ubuntu ito a single script. #1338 (1.12.1)
    • CI tests clang11, also batched shading with clang. #1379 (1.12.2)
    • CI speeds up OIIO builds by not building its tests. #1380 (1.12.2)
    • CI tests gcc11 #1381 (1.12.2) and gcc12 #1565 (1.12.6)
    • Deal with OpenColorIO changing its master branch to "main". #1429
      (1.12.3)
    • Fix tests for texture3d now that OIIO has dropped support for Field3D.
      #1437 (1.12.3)
    • Test against LLVM13/clang13 for the VFX Platform 2022 tests. #1434
      (1.12.3)
    • CI test against MacOS-11 #1434 (1.12.3) and MacOS-12 #1554 (1.12.6)
      #1522 (1.12.5)
    • Add testsuite coverage of environment(). #1438 (1.12.3)
    • Use a project-specific environment variable OSL_CI instead of the more
      generic CI to avoid clashes with other systems. #1446 (1.12.3)
    • Deal with OpenEXR and Imath changing its master branch to "main". #1463
      (1.12.4.4)
    • testrender fix sphere tangents, per MaterialX suggestion. #1465
      (1.12.4.4)
    • Allow testsuite tests to use oiiotool for image diffs instead of idiff.
      #1472 (1.12.4.4)
    • Allow -Werror to be disabled even on CI branches. #1471 (1.12.4.4)
    • CI Tests against the Intel icc and icx compilers! #1459 #1473 (1.12.4.4)
      #1501 (1.12.5.0)
    • Overhaul of GHA ci.yml to use strategy matrix. #1474 (1.12.4.4)
    • Test against clang 14 and fix new warnings. #1498 (1.12.5.0)
    • Test against clang 15 and fix new warnings. #1586 (1.12.6.2)
    • A scorecards workflow guards against a variety of security issues of
      the CI system itself. #1529 (1.12.6.0)
    • Enable SonarCloud static analysis. #1551 #1556 #1563 (1.12.6.0)
  • Platform support:
    • Various Windows compile fixes. #1263 #1285 (1.12.0.1)
    • Windows+Cuda build fixes. #1292 (1.12.0.1)
    • Fix warnings about pointer casts on Windows. #1484 (1.12.4.5)
    • Various Windows build fixes. #1502 (1.12.5.0)
  • The oso and osl lexers/parsers are now given internal symbol names that
    are fully versioned, to avoid possible clash if multiple OSL releases are
    both linked into the same application. #1255 (1.12.0.0)

Documentation:

  • A simple self-contained Cuda/OptiX example has been added as
    testsuite/example-cuda. #1280 (1.12.0.1)
  • Update CLAs, Charter, GOVERNANCE, particularly after acceptance of new
    CLAs and moving the repo to the ASWF GitHub account. #1308 #1240 #1314
    (1.11.11/1.12.1)
  • First steps in new documentation and scripts for building OSL on Windows.
    #1326 (1.12.1)
  • Fix missing explanation of the optional "errormessage" parameter to
    environment() and texture3d(). #1442 (1.12.3/1.11.17)
  • A SECURITY.md file explains how to confidentially report vulnerabilities.
    #1529 (1.12.6)
  • Document all the new MaterialX closures. #1564