Skip to content
Permalink
Branch: master
Commits on Aug 16, 2019
  1. Documentation touch-ups

    lgritz committed Aug 16, 2019
    Includes slight reformatting of the license text to make it correctly
    be auto-recognized by GitHub and have the license displayed. The content
    hasn't changed, it's still the 3-clause BSD, but it's *exactly* copied
    from what GitHub wants to match against.
Commits on Aug 15, 2019
  1. Bump version after dev tag

    lgritz committed Aug 15, 2019
Commits on Aug 9, 2019
  1. docs for tag

    lgritz committed Aug 9, 2019
  2. Allow aggregate component access with .[xyzrgb] (#1049)

    lgritz committed Aug 9, 2019
    Spatial geometry triples (point, vector, normal) now support A.x, A.y,
    A.z as synonyms for A[0], A[1], A[2], respectively. It's not the
    notation I prefer (obviously, or I would have done it 25 years ago),
    but other people really dig it, so fine by me.
    
    Colors now support A.r, A.g, A.b as synonyms for A[0], A[1], A[2],
    respectively.  To be honest, this worries me a little because I fear
    we will regret it if we ever shift to supporting spectral rendering
    (and the components will not necessarily represent red, green, and
    blue, and may have arbitrary number). But again, people really seem to
    like this, so fine, but don't come complaining to me in a few years
    when your shaders all need rewriting for your new spectral renderer.
    
    In both cases, it's for direct reference to lvalues (variables, including
    references passed as arguments to functions):
    
        val = P.x;   // yes
        P.y = val;   // yes
        function_with_float_param (P.z);   // yes
    
    But you can't use this notations on arbitrary expressions:
    
        val = function_returning_color().r;   // no
        val = (P + N).y;                      // no, double ick
    
    We are also NOT supporting "swizzling."
    
    Note that this is strictly an oslc-side change, underneath C.r compiles
    to the same ops as C[0] always did, so newly compiled shader using this
    new syntax can be executed with old renderers/shading engines.
  3. texture "missingalpha" optinal param generated the wrong IR and crash…

    lgritz committed Aug 9, 2019
    …ed. (#1044)
Commits on Jul 29, 2019
  1. Fix typo in cmake message

    lgritz committed Jul 29, 2019
Commits on Jul 24, 2019
  1. Added movies

    lgritz committed Jun 20, 2019
  2. QFontMetrics.width() is marked as deprecated in new Qt. (#1043)

    lgritz committed Jul 24, 2019
    Keep warnings about marked-as-deprecated methods from breaking the OSL build.
    
    On OSX, Homebrew just upgraded to a new enough Qt to see this breakage.
    
    Also fix install_homebrew_deps to make sure Travis OSX test can find
    Qt so it builds osltoy. (It wasn't before, so this build break would
    not have been found by Travis-CI.)
Commits on Jul 8, 2019
  1. Bump minimum OIIO version to 2.0 (#1038)

    lgritz committed Jul 8, 2019
Commits on Jun 19, 2019
  1. ASTNode: Make long chains of nodes (though m_next) free serially, not…

    lgritz committed Jun 19, 2019
    … recursively. (#1031)
    
    Avoids stack overflow for hideously complicated parse trees.
Commits on May 24, 2019
  1. Allow shader params with empty brace inits: (#967)

    lgritz committed May 24, 2019
    Allow shader params with empty brace inits:
    
        type myarray[] = {},
        mystruct S = {}
    
    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).
    
    And it works for structs, too, just means to initialize all the elements
    to is obvious (0, "") default values.
    
    It's syntactic sugar, but it removes some clutter for people who want to
    have shader parameters that are arrays of undetermined length (and thus
    are probably expected to have a runtime-assigned instance value or be
    conntected to an output of an earlier layer within the shader group),
    removes the requirement for spelling out an initializing value that
    won't be used anyway.
  2. Improve errors for badly formed serialized shaders (#1026)

    lgritz committed May 24, 2019
    When using the variety of ShaderGroupBegin that takes a serialized
    description of the group, errors in the individual 'shader', 'param',
    or 'connect' commands were not bubbled up into a proper error message
    for the ShaderGroupBegin call itself, nor caused it to return null
    as the group.
    
    Be more diligent about printing the group name with all group setup
    errors. This includes in testshade, no longer accidentally clearing the
    group name.
Commits on May 22, 2019
  1. Port FindOpenEXR.cmake fixes from OIIO (#1022)

    lgritz committed May 22, 2019
Commits on May 14, 2019
  1. Install crash handlers with stack trace dump (#1019)

    lgritz committed May 14, 2019
    Recently, OIIO sysutil.h added a way to set up a stack trace dump in
    case of crash. Use those in OSL binary commands (it does not
    automatically happen from the library). This only work with a new
    enough version of OIIO, and only if that OIIO was compiled with a new
    enough boost to contain boost's stack trace library (>= 1.65).
    
    This is primarily to help developers figure out what's going on with
    CI tests fail on remote machines -- you can't catch it in the
    debugger, but maybe the stack trace will give you the clue you need as
    to what's going on. I definitely don't expect it to be very helpful if
    the crash happens in the JITed shader. But if the crash is in our code,
    maybe it will help the detective work.
    
    To that end, we also change the testsuite runtest.py so that when a
    command fails entirely, print its console output.
    
    And bump appveyor boost to 1.69, so that it's new enough to support
    the stack trace library.
Commits on May 13, 2019
  1. Enable OptiX on many tests (#1018)

    lgritz committed May 13, 2019
    Add 'OPTIX' label files to a whole bunch of testsuite tests to force
    them to run in OptiX mode also.
    
    Make sure optix tests run both optimized and unoptimized.
    
    Moany tests still ran 'testsuite -g 2 2' to run at 4 points as if on a
    grid. This was an artifact from the early days when we had a "batched
    shader bytecode interpreter" that handled "varying" specially and
    needed to run on multiple points at once to ensure that they were
    shading entire grids properly. But once we switched to LLVM JIT and a
    "single point shading model", that was no longer necessary. But never
    had a good reason to change them before.
    
    Lots of tests "failed" OptiX mode just because printf wasn't working
    correctly for multiple points. That's silly, we can test printf interleaving
    separately and with one test. No need to make passing dozens or hundreds
    of others contingent on that one problem, rather than hinging on whether
    OptiX path can really implement the feature that the test was designed
    to demonstrate.
    
    So for a bunch of tests, I changed them from running 'testsuite -g 2 2' to
    just running on one point, and enabled OptiX mode to get a pass.
    
    All in all now, I believe we pass 37 tests in OptiX mode (both optimized
    and not optimized). We will try to grow this week by week.
Commits on May 6, 2019
  1. CHANGES

    lgritz committed May 6, 2019
Commits on May 2, 2019
  1. Warn about missed optimizations (#1010)

    lgritz committed May 2, 2019
    * Warn about missed optimizations
    
    * Properly track gettextureinfo handle use in the stats.
    
    * New ShadingSystem option: "opt_warnings" enables warnings about
      things that couldn't be optimized and may be performance issues.
    
    * New ShadingSystem option: "gpu_opt_error" enables full error status
      of the subset of those warnings that are also hard no-go's when
      executing on GPUs.
    
    As an example, the first such warning/error is for texture calls where
    the name of the texture cannot be fully resolved to a known string
    constant during the course of runtime optimization. We will add other
    warnings/errors over time.
    
    The warnings/errors are sent back to the renderer's ErrorHandler,
    and as an example they look like this:
    
        Optimization warning:
          group:  bumpy_material_14
          layer:  disp_texture_2
          source: shaders/tex.osl:58
          issue:  texture(): texture name cannot be reduced to a constant.
Commits on May 1, 2019
  1. testsuite runtest.py cleanup (#1009)

    lgritz committed May 1, 2019
    * Fix bug from PR 1001, default value for missing OSL_SOURCE_DIR env
      variable should not have included the testsuite directory itself.
    
    * Be sure to correctly redirect all stderr to the same saved file as
      stdout. This makes it easier to have testsuite entries that test
      warning or error output.
Commits on Apr 25, 2019
  1. SPI only: bump the version of partio we use internally (#1005)

    lgritz committed Apr 25, 2019
  2. Modify testsuite to run optix tests (#1004)

    lgritz committed Apr 25, 2019
    We previously had each test run twice: once with -O0 and again with
    -O2. Because one tests the actual literal code specified in the shader
    (without the possibility of being optimized away) and the other tests
    the optimization to make sure it still matches.
    
    This patch extends the logic to allow the possibility of every test
    running in optix mode as well, if the code base is built with
    USE_OPTIX=1.
    
    For now, it only runs optix mode if the individual test has "optix"
    in its name, or if the test directory has a file called "OPTIX" present.
    Also, if environment variable TESTSUITE_OPTIX=1, it will try to run
    *all* tests with optix mode (that's just for me... most of them fail
    at the moment).
    
    The eventual goal is for these conditions to change, so that in a
    USE_OPTIX=1 build, *all* tests run optix flavors unless not marked
    with a NOOPTIX file in their directory.
    
    At the moment, *6* tests pass for me in OptiX mode. Now we can start
    attacking the features to get more and more tests to pass identically
    on CPU and GPU.
    
    I realized that there were many tests that are only trying to test
    that oslc issues the right error or warning for various malformed
    code, or that are only compiling the shader to test oslinfo, or a few
    other such cases that run oslc only and never try to execute their
    shaders. So I also liberally sprinkled NOOPTIX as well as NOOPTIMIZE
    marker files in those test directories, to skip optix tests, and also
    skip a second "optimized" run of the same test (which was pointless,
    because it wasn't executing at all).
Commits on Apr 23, 2019
  1. Refactor testshade argument parsing (#1003)

    lgritz committed Apr 23, 2019
    We had a weird chicken-and-egg problem after a recent testshade
    refactor, where getargs parsing made the individual shadingsystem
    calls to set up the group, but also set other options we wished had
    been established before this parsing starts.
    
    The solution is change the main getargs to NOT fully set up the shader
    group, but instead to just stash away the group setup args for later
    processing. Then after the renderer and SS are fully set up
    considering all the other options, we re-parse the stashed options and
    set up the shader group.
    
    This fixes some embarrassing reliance on the TESTSHADE_OPTIX environment
    variable during tests.
Commits on Apr 22, 2019
  1. Fix inadvertently missing SS::Parameter() implementation (#1000)

    lgritz committed Apr 22, 2019
    The implementation of #984 inadvertently lost one of the old
    variants of the SS::Parameter() call. There was a 3-param version
    and a 4-param version separately declared, but somehow in the code
    that was merged, only the 4-param version has an implementation.
    Fix by merging the declarations so that it's a 4-param method with
    a default value for the last argument (which I think was my intent
    all along).
Commits on Apr 19, 2019
  1. Print output of failed diffs when testing

    lgritz committed Apr 19, 2019
  2. testshade --optix (#996)

    lgritz committed Apr 19, 2019
    Works for simple cases. Use with caution, there is a LOT that doesn't
    work in the OptiX path. Embarrassingly so. But this refactor makes it so
    that the last of the old "testoptix" oriented tests now work using
    "testshade --optix".
    
    It also requires that environment variable TESTSHADE_OPTIX=1 must be
    set.  This is for weird reasons that have to do with argument orders,
    and will go away in the next refactor of testshade, so I don't even
    want to bother explaining. It's about to get fixed.
    
    There is a lot that doesn't work properly. Frankly, I would encourage
    onlookers to wait for another couple of checkins from me before wasting
    any time on this. The most embarrassing parts will be fixed soon.
Commits on Apr 16, 2019
  1. Add build-time option to set gcc C++ ABI (ported from OIIO) (#995)

    lgritz committed Apr 16, 2019
Commits on Apr 15, 2019
Commits on Apr 12, 2019
  1. Revise shader install path and stdosl.h search (#956)

    lgritz committed Apr 12, 2019
    * Revise shader install path and stdosl.h search
    
    Issue #955 points out that we install the example shaders (and stdosl.h)
    in PREFIX/shaders. That may be fine for a totally custom directory, but
    it's nonstandard and rightly frowned upon if the prefix is a system-wide
    place like /usr. Just like docs go in PREFIX/share/doc, probably the
    shaders ought to go in PREFIX/share/shaders.
    
    So this patch makes that change. Does anybody think that will be
    extremely disruptive?
    
    Modify oslc/liboslcomp to search in the new location (as well as
    the old), and while we're at it, I was able to significantly clean up
    and compress find_stdoslpath(). Also adjusted what in retrospect was
    a logical error in how we search for stdosl: I now think that the
    user-supplied include paths (for example, `oslc -Ifoo -Ibar`)
    probably ought to be the first places searched, not the last (as it was
    before).
    
    Fixes #955
    
    * Move shaders to .../shared/OSL/shaders
    
    * Allow option to control shader install dir
Commits on Apr 10, 2019
  1. oslc: slight adjustment to assignment typechecking (#993)

    lgritz committed Apr 10, 2019
    Consider int=float to be a warning, not an error.
    This is partly because C allows it and we ran accross some
    examples where it seems more strict than necessary.
    (Of course it works without warning if you use a cast, showing
    that any trucation is intentional.)
Commits on Apr 8, 2019
  1. Fix up testrender error handling: use an ErrorHandler properly, not s…

    lgritz committed Apr 8, 2019
    …tderr (#992)
Commits on Apr 5, 2019
  1. Improve oslc type error detection for variable declaration with init (#…

    lgritz committed Apr 5, 2019
    …991)
    
    Turns out that some of the various type checking we do for simple
    assignment,
    
        x = y
    
    was not being checked at all for variable declaration with initialization,
    
        Type x = y
    
    So this patch adds the necessary checks. And also goes back and improves
    the error messages for regular variable assignment, changing from messages
    like
    
        Cannot assign 'float' to 'int'
    
    to the more clear (I think, because it names the variable, and looks
    more like the grammatical construct being complained about)
    
        Cannot assign int i = float
  2. Change remaining refs to array_view to cspan (#990)

    lgritz committed Apr 5, 2019
  3. testoptix is dead. Long live testrender! (#989)

    lgritz committed Apr 5, 2019
    This extensive refactor fully merges all remaining testoptix
    functionality into testrender, and deletes the remnants of testoptix.
    
    There's still lots of refactoring I intend to do moving forward,
    especially as I made an optix mode to 'testshade' as well. But this
    is a good checkpoint to merge.
Commits on Apr 1, 2019
  1. Add all testoptix functionality to testrender

    lgritz committed Mar 23, 2019
    This attempts to merge them. In the process, it's a pretty big overhaul
    of the internal organization of testrender, a lot of stuff moves around
    between files and classes are refactored significantly.
    
    N.B. render-veachmis changes slighty, only on osx, and I don't know why.
    Return to investigate later.
    
    Revise to bring in line with Roman's changes
    
    I made a bunch of changes to testoptix, not altering any functionality
    but just mashing things around to make it more symmetric to testrender
    and make diffing between them easier.
    
    Several file have been removed from testoptix, which now gets them
    from the copies in testrender (so at least there's only one copy now):
    all the .cu files, testoptix stringtable.{cpp,h},
    shading.{cpp,h}, raytracer.h.
    
    All that's left now in testoptix is testoptix.cpp, optixrend.h,
    optirend.cpp. In a subsequent PR I will complete this process by
    replicating all remaining testoptix functionality in testrender and
    then getting rid of the remainder of testoptix.
  2. Revert "Add all testoptix functionality to testrender (#987)"

    lgritz committed Apr 1, 2019
    This reverts commit 3e1857f.
Older
You can’t perform that action at this time.