-
Notifications
You must be signed in to change notification settings - Fork 862
[ShaderGraph] [2021.2] Fix include ordering #3924
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
Conversation
…operty declarations
…12.x version tests)
…it on some test shaders)
| bool isOSX = | ||
| (Application.platform == RuntimePlatform.OSXEditor) || | ||
| (Application.platform == RuntimePlatform.OSXPlayer); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vulkan doesn't guarantee more than 16 either. I suspect most desktop implementations actually provide more than 16, but the hardware requirements for the spec are derived from OpenGL ES 3.1, so it's not guaranteed without checking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it at least passes on Windows Editor / Vulkan on my box.
jessebarker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…he multi-import tests (we rely on being able to lookup files by GUID)
jessebarker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated changes look good
...y.render-pipelines.high-definition/Editor/Material/ShaderGraph/Templates/ShaderPass.template
Show resolved
Hide resolved
ghost
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Developer testing is sufficient
* Fix include ordering by moving graph/node based includes below the property declarations * Adding tests for include file / custom function node issue (and also 12.x version tests) * Handling compile faillures on OSX GLCore tests (sampler limit count hit on some test shaders) * Fix compile * Disabling failing test for now * Think this will fix the tests -- variable name was too long * Testing super short variable names * think this fixes it -- force asset database to update before we run the multi-import tests (we rely on being able to lookup files by GUID)
This reverts commit 331d995.
Purpose of this PR
Fix for https://fogbugz.unity3d.com/f/cases/1322467/
This fixes a regression introduced by this PR: #3290
By registering the node include files at generation time, instead of splicing them into the generated code, we can now properly track the include dependencies; but it also moved the location where the includes were spliced. In particular, the node includes now show up before the property declarations in many templates. In order for the CustomFunctionNode included files to be able to access shader properties, the includes must come after the property declarations. This PR adds a new include splice location "Graph", which come after the property declaration, and then moves all node-declared includes to this new location.
Testing status
Added a ShaderGraph test for include file usage of graph properties:
Yamato tests:
(running against trunk f4de2e18f4148a678759ff44540c9d25ffd9d99f, because of trunk breakages)
ShaderGraph PR Job: 🟢
https://yamato.cds.internal.unity3d.com/jobs/902-Graphics/tree/sg%252Ffix%252F1322467/.yamato%252Fall-shadergraph.yml%2523PR_ShaderGraph_CUSTOM-REVISION/5939294/job/pipeline
Failures:
Build ShaderGraph on iPhone_Metal_il2cpp_Linear_Standalone_cache_build_Player on version CUSTOM-REVISION -- success on re-run
Universal PR Job: 🟢
https://yamato.cds.internal.unity3d.com/jobs/902-Graphics/tree/sg%252Ffix%252F1322467/.yamato%252Fall-universal_split.yml%2523PR_Universal_Split_CUSTOM-REVISION/5939301/job/pipeline
Failures:
URP_Foundation on iPhone_Metal_Standalone_cache_il2cpp_Linear on version CUSTOM-REVISION -- success on re-run
HDRP PR Job: 🟢
https://yamato.cds.internal.unity3d.com/jobs/902-Graphics/tree/sg%252Ffix%252F1322467/.yamato%252Fall-hdrp.yml%2523PR_HDRP_CUSTOM-REVISION/5946563/job/pipeline
Failures:
Build VFX_HDRP on Win_DX11_mono_Linear_Standalone_cache_build_Player on version CUSTOM-REVISION -- also fails on master
Build VFX_HDRP on Win_DX12_mono_Linear_Standalone_cache_build_Player on version CUSTOM-REVISION -- also fails on master
VFX_HDRP on Win_DX11_Standalone_cache_mono_Linear on version CUSTOM-REVISION -- also fails on master
VFX_HDRP on Win_DX12_Standalone_cache_mono_Linear on version CUSTOM-REVISION -- also fails on master
Pack and Test Job: 🟢
https://yamato.cds.internal.unity3d.com/jobs/902-Graphics/tree/sg%252Ffix%252F1322467/.yamato%252F_projectcontext.yml%2523test_all_project_Win_trunk/5946535/job
Comments to reviewers
Notes for the reviewers you have assigned.