12 Commits
Author SHA1 Message Date
Alex WellsandLarry Gritz e7ca0926c9 Pr/batched texture (#1436)
* Add batched support for 2d texture calls, gettextureinfo.

To enable, added:
  bool RenderServices::is_udim (TextureHandle *texture_handle)
  TextureSystem::TextureHandle* BatchedRendererServices::resolve_udim_uniform(...,TextureSystem::TextureHandle*, float S, float T)
  void BatchedRendererServices::resolve_udim(...,TextureSystem::TextureHandle*,Wide<const float> wS, Wide<const float> wT, Masked<TextureSystem::TextureHandle*> wresult)

which allows batched code gen to resolve_udim's for varying S & T and bin the resulting TextureHandle* and make calls to get_texture_info_uniform with a single resolved udim texture handle, then broadcast the results to data lanes with matching TextureHandle *'s.

Added extensive new regression tests:
    gettextureinfo-reg
    gettextureinfo-udim-reg
    texture-opts-reg

Enabled BATCHED execution of existing tests:
    gettextureinfo-udim
    gettextureinfo
    texture-alpha-derivs
    texture-alpha
    texture-blur
    texture-connected-options
    texture-derivs
    texture-errormsg
    texture-firstchannel
    texture-interp
    texture-missingalpha
    texture-missingcolor
    texture-simple
    texture-smallderivs
    texture-swirl
    texture-udim
    texture-width
    texture-withderivs
    texture-wrap

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

* Removed some commented out includes

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

* Add conditional compilation dependent on OIIO version to enable RendererServices::is_udim

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

* Fix clang-format issues

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

* Fix bug in testing.cmake where non-existant OPENIMAGEIO_VERSION was being checked, when it should have been OpenImageIO_VERSION.

Added quiet option to oiio-tool calls in regression tests to allow produced out.txt to match between baseline and batched runs.

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

* Added optional silent=False argument to oiiotool in test suite, allowing us to avoid generating warnings for file already exists that was causing differences when comparing baseline/out.txt and out.txt in regression tests

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

* Added missing batched texture option rnd for the llvm code gen representation

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

* Fixed compilations issues with OIIO 2.4 by enabling "rnd" batched texture option.
Fixed some other compilation issues when OSL_DEV is defined.

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

* Cleared up some comments around populating rnd.

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

* Add support for batched texture3d.

Discovered mismatch between documentation, llvm_gen implementation, and oslc when passing user derivatives to texture3d.
oslc and documentation expect optional parameters "vector dpdx, vector dpdy, vector dpdz",
however llvm_gen and optexture implementation only accept "vector dpdx, vector dpdy"
and use 0 for dpdz when calling into the texture subsystem.

This commit includes changes to oslc to make the compiler match the implementation of accepting only "vector dpdx, vector dpdy".

Enable BATCHED execution of testsuite/texture3d
Add new regression test textur3d-opts-reg

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

* Revert oslc to make the compiler match the documentation of accepting only user inputs that include dpdz:  "vector dpdx, vector dpdy, vector dpdz".
Fixed llvm_gen and optexture to properly extract user dpdz from texture3d options or initialize a Vec3(0) and pass through to texture subsystem.
Modified batched_llvm_gen and wide_optexture to properly extract user dpdz from texture3d options or initialize a Wide<Vec3>(0) and pass through to texture subsystem.
Updated texture3d-opts-reg test to pass dpdz for calls taking user derivatives.

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

* Added batched support for environment.

Added BatchedRendererServices::environment virtual method

Added new test environment
Added new regression test environment-opt-reg

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

* clang-format of batched_rendererservices.h

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

* Rename testsuite/environment-opts-reg to testsuite/texture-environment-opts-reg to line up with a different PR adding testsuite/texture-environment.

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

* Removed some environment option test for "wrap" as that is an unsupported option for environment.
Added test and handling for "time" option to batched texture3d.  Current choice is to just silently ignore "time" as currently supported 3d formats do not support time.

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

* Removed redundant environment test as texture-environment covers it.
Enabled BATCHED execution of texture-environment

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

* Extended test timouts further for arithmetic-reg.regress.batched.opt and transform-reg.regress.batched.opt which were causing spurious CI timeouts.
Reduced some multipliers of user supplied derivs to environment tests to reduce differences in results.

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>

Co-authored-by: Larry Gritz <lg@larrygritz.com>
2021-11-30 18:35:11 -08:00
Larry Gritz 04d331e439 Transitioning repository to ASWF (#1329)
* Rename CLA files so they no longer say "draft."

* Change CONTRIBUTING.mv to correctly describe the new CLA process,
  remove language related to the old SPI CLAs. Also some touchups to
  README.md.

* Update the project_intake.md to check of various things that we've
  completed.

* Change all references to the old imageworks GitHub URLs to the new
  ASWF ones. (This touches comments at the start of basically every file.)

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2021-01-25 09:44:09 -08:00
Larry Gritz ffc5303dcf Big copyright and license cleanup to follow ASWF conventions (#1145)
This brings us into conformance with ASWF standards for license text
and how the copyright notices read. (And was cleared by Sony and Linux
Foundation.) This is the same set of changes made to all the other
projects coming into the foundation, including OpenColorIO.

Please note that none of the licenses are changing -- it's the same
3-clause BSD license we have always used. Also, this doesn't change
any of the copyright holders -- it has always been the case that the
authors of each patch retain the copyright to their specific additions
or changes. OSL has never required copyright assignment for
contributions.

* Add a LICENSE-THIRD-PARTY.md file that documents imported software.

* Update documentation license to CC-BY-4.0 (from 3.0).

* Fully reproduce the Qt license in the two files derived from Qt
  example code.

* Change copyright notice to the new wording of 'Contributors to the
  Open Shading Language project', per ASWF convention.

* Replace lengthy per-file copyright boilerplate with SPDX short form.
  (This is more readable and is easily scanned by automated software to
  detect which licenses are used.)

* For any files lacking a copyright notice, license text, or SPDX
  identifier, add them.

* Fix test output for many unit tests where line numbers changed after
  license info was added to .osl files in the testsuite.
2020-04-16 16:55:29 -07:00
Larry Gritz 1515877361 New ref images for recent OIIO texture improvement.
Related to https://github.com/OpenImageIO/oiio/pull/1369
We can remove the old-oiio1.5 images once 1.6 is the minimum standard for OSL.
2016-02-25 17:03:16 -08:00
Larry Gritz 366e979681 More uniform path for python binary retrieval 2015-03-20 13:14:18 -07:00
Larry Gritz fc7b1a50b6 testsuite overhaul -- all temp files end up in build, runtest.py called directly and the run.py files shrink down to the bare minimum. Similar to the recent changes in OIIO testsuite. 2012-03-09 16:45:08 -08:00
Larry Gritz af952071d3 Fix testshade bug where we were computing derivs subtly wrong all along. Also, fix all the texture tests to shade 'image-like' rather than 'grid-like' and update reference images for anything that changed due to these two items. 2011-06-20 16:02:54 -07:00
Larry Gritz 5e1a23e9a8 Update reference images after recent OIIO change that fixed a rounding error
when saving 8 bit files.
2011-06-14 10:33:27 -07:00
Larry Gritz f92784f68e Update ref images due to OIIO texture changes 2011-04-13 09:38:15 -07:00
Chris Kulla a4588c18a1 Update texture testsuite images to uint8 format
Also updates wrap images for recent derivative fix to mul opcode

git-svn-id: https://openshadinglanguage.googlecode.com/svn/trunk@333 a3683778-fedd-11de-87c3-653bb6514e15
2009-10-15 18:01:29 +00:00
Chris Kulla e2e8e2db32 Fixup svn:ignore property for these new tests and remove accidently committed files
git-svn-id: https://openshadinglanguage.googlecode.com/svn/trunk@289 a3683778-fedd-11de-87c3-653bb6514e15
2009-10-07 21:16:41 +00:00
Larry Gritz 4f2a087a50 Implement texture() op.
git-svn-id: https://openshadinglanguage.googlecode.com/svn/trunk@286 a3683778-fedd-11de-87c3-653bb6514e15
2009-10-07 00:32:22 +00:00