Re-remove device decoration from some osl_ functions #1951
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Recent PR #1852 (Free functions for texturing, point clouds, and trace) added host/device decorations to certain
osl_
functions that previously were replicated in OptiX-based renderers. This means that now the ones in those renderers will be seen as duplicate symbols.The more clear intent that we'd like to work towards is that all the
osl_
functions are meant to be "internal" to the liboslexec or the bitcode it provides, and thers_
functions are the customization points that the renderer is expected to supply.Except... a bunch of the
osl_
functions that set parameters for subsequent texture and trace calls do not yet havers_
customization points. So we're actually not quite ready to change things.To unbreak, then, this PR removes the
__device__
decorations (so they are again safe/expected for GPU renderers to override them). To keep testshade/testrender working, we add copies of them to testshade/testrender specifically.Like I said, eventually we'll add
rs_
customization points, and at that point, we'll truly expect theosl_
functions to be only supplied by oslexec itself and not the renderers.