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

[ShaderGraph] [BugFix 1271618] fix SampleVirtualTextureNode output slots (when toggling AutoStream) #1717

Merged
merged 3 commits into from
Sep 3, 2020

Conversation

cdxntchou
Copy link
Contributor

@cdxntchou cdxntchou commented Aug 31, 2020

Purpose of this PR

Fixes https://fogbugz.unity3d.com/f/cases/1271618/

When toggling automatic streaming, the SampleVirtualTexture node refreshes it's slots.

Previously it did so using the UpdateNodeAfterDeserialization() which does not check the connected property to find the correct number of slots, so it displays all four slots by default. However, if there are fewer than four slots configured, the extra output slots will not work and will cause errors if the user connects to them.

The fix here is to directly call RebuildAllSlots(true), so that it looks at the vtProperty when determining the number of slots.
This is exactly equivalent to the old behavior of UpdateNodeAfterDeserialization(), except it passes true instead of false.


Testing status

Manual Tests: What did you do?
Tested in local windows editor against repro case.

Yamato: (Select your branch):
https://yamato.prd.cds.internal.unity3d.com/jobs/902-Graphics

Any test projects to go with this to help reviewers?


Comments to reviewers

Notes for the reviewers you have assigned.

@cdxntchou cdxntchou requested review from esmelusina and a user August 31, 2020 17:37
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Manual testing by developer is sufficient

@cdxntchou cdxntchou marked this pull request as ready for review September 1, 2020 18:49
@cdxntchou cdxntchou requested a review from a team as a code owner September 1, 2020 18:49
@cdxntchou
Copy link
Contributor Author

Yamato green except for OSX_Metal jobs which are also failing on trunk

@cdxntchou cdxntchou merged commit f4eaad9 into master Sep 3, 2020
@cdxntchou cdxntchou deleted the sg/fix/1271618 branch September 3, 2020 16:01
@ghost ghost added the needs-backport-9.x label Sep 17, 2020
cdxntchou pushed a commit that referenced this pull request Sep 18, 2020
…ots (when toggling AutoStream) (#1717)

* Fix for 1271618 (disabling Automatic Streaming caused the SampleVirtualTexture node to display 4 output slots)
cdxntchou pushed a commit that referenced this pull request Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants