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

RuntimeOptimizer: Fix messages & unknown_message_sent initialization #1447

Merged
merged 1 commit into from
Dec 15, 2021

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Dec 14, 2021

Alex Wells pointed out that they were never explicitly initialized.

Signed-off-by: Larry Gritz [email protected]

Alex Wells pointed out that they were never explicitly initialized.

Signed-off-by: Larry Gritz <[email protected]>
@lgritz lgritz requested a review from AlexMWells December 14, 2021 21:34
lgritz referenced this pull request Dec 14, 2021
including if a non-constant named message is ever set (could be
anything).  Then for getmessage() of a known name, if it couldn't
possibly have been set, turn the getmessage into simply an assignment of
0 to the result (not found).

This saves 10% of total render time on our favorite production
benchmark!  Lots of our production shaders check for messages that
trigger special behavior (usually for debugging), but apparently it's
rarely set.  Not only do we save the trouble of doing the getmessage()
in these cases, but often the absence of the message allows us to get
rid of entire "if" clauses of code that won't be used for this shader
instance.

http://codereview.appspot.com/1106041/show
Review by: ckulla


git-svn-id: https://openshadinglanguage.googlecode.com/svn/trunk@625 a3683778-fedd-11de-87c3-653bb6514e15
Copy link
Contributor

@AlexMWells AlexMWells left a comment

Choose a reason for hiding this comment

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

LGTM

@lgritz lgritz merged commit 7e2bcbb into AcademySoftwareFoundation:main Dec 15, 2021
@lgritz lgritz deleted the lg-unknownmess branch December 28, 2021 23:02
lgritz added a commit to lgritz/OpenShadingLanguage that referenced this pull request Dec 28, 2021
…cademySoftwareFoundation#1447)

Alex Wells pointed out that they were never explicitly initialized.

Signed-off-by: Larry Gritz <[email protected]>
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