Skip to content

Conversation

cdxntchou
Copy link

@cdxntchou cdxntchou commented Dec 2, 2021

Purpose of this PR

Fixing https://fogbugz.unity3d.com/f/cases/1383046/
This issue is already fixed in 2022.1+ via this much larger PR:

However we don't want to backport that PR.

This PR addresses just this specific issue for 2021.2.

The issue in 2021.2 is that the functions coming from this node get whitespace appended to them when they are in a subgraph, and it detects the whitespace as a different function.

I added a call to trim the whitespace from all functions before comparing them.


Testing status

Tested against repro case: colliding functions no longer collide.
Ran ShaderGraph tests locally (PC D3D11) -- success.

Yamato tests:
ShaderGraph: 🟡
https://yamato.cds.internal.unity3d.com/jobs/902-Graphics/tree/2021.2%252Fsg%252Ffix%252F1383046/.yamato%252Fall-shadergraph.yml%2523PR_ShaderGraph_2021.2/10259680/job/pipeline

Master:
https://yamato.cds.internal.unity3d.com/jobs/902-Graphics/tree/2021.2%252Fsg%252Ffix%252F1383046/.yamato%252Fall-shadergraph.yml%2523PR_ShaderGraph_2021.2/10266213/job/pipeline

Same jobs failing in master (Linux Vulkan & Windows DX11) -- tracked down to an upgrade from GTX gpus to RTX gpus on the test farm, changing the behavior of the sin() HLSL function, so not related to this PR.

URP: 🟢
https://yamato.cds.internal.unity3d.com/jobs/902-Graphics/tree/2021.2%252Fsg%252Ffix%252F1383046/.yamato%252Fall-universal_split.yml%2523PR_Universal_Split_2021.2/10369086/job/pipeline


Comments to reviewers

Notes for the reviewers you have assigned.

… this addresses just this specific issue for 2021.2)
@github-actions
Copy link

github-actions bot commented Dec 2, 2021

Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed.
Link to Yamato: https://unity-ci.cds.internal.unity3d.com/project/902/
Search for your PR branch using the search bar at the top, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

Shader Graph
/jobDefinition/.yamato%252Fall-shadergraph.yml%2523PR_ShaderGraph_2021.2
Depending on your PR, you may also want
/jobDefinition/.yamato%252Fall-shadergraph_builtin_foundation.yml%2523PR_ShaderGraph_BuiltIn_Foundation_2021.2
/jobDefinition/.yamato%2Fall-shadergraph_builtin_lighting.yml%23PR_ShaderGraph_BuiltIn_Lighting_2021.2

Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure.

@cdxntchou cdxntchou marked this pull request as ready for review December 2, 2021 00:30
@cdxntchou cdxntchou requested a review from a team as a code owner December 2, 2021 00:30
@cdxntchou cdxntchou requested a review from a team December 7, 2021 17:36
Copy link
Contributor

@GrantLamb-Unity GrantLamb-Unity left a comment

Choose a reason for hiding this comment

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

Looks like a fairly small change, Chris's verifications of running through the repro steps should be sufficient for this stage of bugfix validation.

@cdxntchou cdxntchou merged commit 6fde353 into 2021.2/staging Dec 9, 2021
@cdxntchou cdxntchou deleted the 2021.2/sg/fix/1383046 branch December 9, 2021 21:52
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.

3 participants