Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make isconnected() work with downstream renderer "connections." #1782

Conversation

sfriedmapixar
Copy link
Contributor

Description

The isconnected() returns 2 when used on an output that is connected to another downstream shader node -- this can be used to limit computation to only the outputs used. However, that misses the important case of where the renderer has declared a shader node output as a renderer output, which happens often when using OSL purely for pattern generation purposes. This change makes that case also return 2.

Tests

The isconnected test has been updated to include testing this functionality.

Checklist:

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite (adding new test cases if necessary).
  • My code follows the prevailing code style of this project. If I haven't
    already run clang-format v17 before submitting, I definitely will look at
    the CI test that runs clang-format and fix anything that it highlights as
    being nonconforming.

The isconnected() returns 2 when used on an output that is connected to another downstream shader node -- this can be used to limit computation to only the outputs used.  However, that misses the important case of where the renderer has declared a shader node output as a renderer output, which happens often when using OSL purely for pattern generation purposes.  This change makes that case also return 2.

The isconnected test has been updated to include testing this functionality.

Signed-off-by: Stephen Friedman <[email protected]>
Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay. LGTM.

@lgritz lgritz merged commit b6c8dde into AcademySoftwareFoundation:main Apr 5, 2024
22 of 23 checks passed
lgritz pushed a commit to lgritz/OpenShadingLanguage that referenced this pull request Apr 29, 2024
…emySoftwareFoundation#1782)

The isconnected() returns 2 when used on an output that is connected to another downstream shader node -- this can be used to limit computation to only the outputs used.  However, that misses the important case of where the renderer has declared a shader node output as a renderer output, which happens often when using OSL purely for pattern generation purposes.  This change makes that case also return 2.

The isconnected test has been updated to include testing this functionality.

Signed-off-by: Stephen Friedman <[email protected]>
chellmuth pushed a commit to chellmuth/OpenShadingLanguage that referenced this pull request Sep 6, 2024
This won't be picked up by the platforms yet, they are still using
1.13.5.x for 2023.10 (as well as still OIIO 2.6.0.x, which is too old
for this OSL release). So really the only client for this build is
likely Arnold.

Highlights:

* Raise OpenImageIO to 2.6.1.0.
* RS::get_texture_info make robust to empty shaderglobals param (AcademySoftwareFoundation#1731)
* LLVM opaque pointers support (AcademySoftwareFoundation#1728)
* LLVM new pass manager support (AcademySoftwareFoundation#1729)
* LLVM 16 and 17 support (AcademySoftwareFoundation#1730)
* fix: SymOverrideInfo bitfields should be the same type (AcademySoftwareFoundation#1745)
* fix: batched pointcloud if "index" is not passed (AcademySoftwareFoundation#1753)
* api: Ustringhash phase 3 (AcademySoftwareFoundation#1732)
* fix: Fix NVPTX TargetMachine leak, etc. (AcademySoftwareFoundation#1763)
* feat(api): Add API for building interpolated getter free functions. (AcademySoftwareFoundation#1765)
* build: add options to use static Cuda libraries (AcademySoftwareFoundation#1772)
* build(deps): Initial support for LLVM-18 (AcademySoftwareFoundation#1773)
* fix: Mute partio error prints (AcademySoftwareFoundation#1774)
* fix: calculatenormal needs fliphandedness (AcademySoftwareFoundation#1783)
* fix: Print closure missing error message at compile time instead of run time.  (AcademySoftwareFoundation#1781)
* fix: GPU interpolated param initialization (AcademySoftwareFoundation#1791)
* oslquery: Simplify include and link needs (AcademySoftwareFoundation#1787)
* Make isconnected() work with downstream renderer "connections." (AcademySoftwareFoundation#1782)

Also along for the ride:

* Remove the `blah-platform/=1.0` preamble, no longer needed.
* Stop building for deprecated Nuke 12 and 13 platforms.
* Raise cmake build version to 3.24

See merge request spi/dev/3rd-party/osl-feedstock!57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants