-
Notifications
You must be signed in to change notification settings - Fork 840
[9.x.x] Fix allocation caused when sorting cameras in URP. #268
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ellioman
approved these changes
Apr 25, 2020
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
phi-lira
added a commit
that referenced
this pull request
May 12, 2020
* Fixed allocation caused by camera sort. * Added changelog. # Conflicts: # com.unity.render-pipelines.universal/CHANGELOG.md
Merged
phi-lira
added a commit
that referenced
this pull request
May 14, 2020
* Fixed allocation caused by camera sort. * Added changelog. # Conflicts: # com.unity.render-pipelines.universal/CHANGELOG.md # Conflicts: # com.unity.render-pipelines.universal/CHANGELOG.md # com.unity.render-pipelines.universal/Runtime/UniversalRenderPipelineCore.cs
Merged
phi-lira
added a commit
that referenced
this pull request
May 15, 2020
* Fixed quality settings v2. (#181) * Universal Bugfixes (#6109) * Fixed shader pass name issue (case 1201696) * Fixed typo in encodedIrradiance. * Fixed viewport rect not working with render textures. * Added changelog * Enabled Allocations tests when rendering. * Forward Renderer is not sealed anymore. Now developers can subclass it. * Added Test Scene * Excluded post-processing tests from build. * Enabled playmode tests for all assemblies * Removed unnecessary new shader. UnlitTexture is used instead. * Updated reference images. * Updated scene to fix tests. # Conflicts: # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/Android/OpenGLES3/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/Android/OpenGLES3/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/Android/Vulkan/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/Android/Vulkan/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/LinuxEditor/OpenGLCore/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/LinuxEditor/OpenGLCore/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXEditor/Metal/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXEditor/Metal/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXEditor/OpenGLCore/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXEditor/OpenGLCore/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXPlayer/Metal/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXPlayer/Metal/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXPlayer/OpenGLCore/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXPlayer/OpenGLCore/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsPlayer/Vulkan/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsPlayer/Vulkan/127_ClearRenderTexture.png.meta # com.unity.render-pipelines.universal/CHANGELOG.md # Conflicts: # TestProjects/UniversalGraphicsTest/ProjectSettings/ProjectSettings.asset # com.unity.render-pipelines.universal/CHANGELOG.md # com.unity.render-pipelines.universal/Runtime/ForwardRenderer.cs # Conflicts: # com.unity.render-pipelines.universal/CHANGELOG.md * Post-processing is not causing GC alloc anymore. (#192) * [9.x.x] Fix allocation caused when sorting cameras in URP. (#268) * Fixed allocation caused by camera sort. * Added changelog. # Conflicts: # com.unity.render-pipelines.universal/CHANGELOG.md # Conflicts: # com.unity.render-pipelines.universal/CHANGELOG.md # com.unity.render-pipelines.universal/Runtime/UniversalRenderPipelineCore.cs * [9.x.x] Fix computation of inverseVP matrix. (#374) * Fixed issue that caused wrong computation of unity inverse view and projection matrix. * Added graphics tests. * filtered test 130 from android due to trunk issues. # Conflicts: # TestProjects/UniversalGraphicsTest/ProjectSettings/EditorBuildSettings.asset # com.unity.render-pipelines.universal/CHANGELOG.md # Conflicts: # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/Android/OpenGLES3/130_UnityMatrixIVP.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/Android/OpenGLES3/130_UnityMatrixIVP.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXEditor/Metal/130_UnityMatrixIVP.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXEditor/Metal/130_UnityMatrixIVP.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXEditor/OpenGLCore/130_UnityMatrixIVP.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXEditor/OpenGLCore/130_UnityMatrixIVP.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXPlayer/Metal/130_UnityMatrixIVP.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXPlayer/Metal/130_UnityMatrixIVP.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXPlayer/OpenGLCore/130_UnityMatrixIVP.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXPlayer/OpenGLCore/130_UnityMatrixIVP.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/130_UnityMatrixIVP.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/130_UnityMatrixIVP.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/130_UnityMatrixIVP.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/130_UnityMatrixIVP.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsPlayer/Vulkan/130_UnityMatrixIVP.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsPlayer/Vulkan/130_UnityMatrixIVP.png.meta # TestProjects/UniversalGraphicsTest/Assets/Test/TestFilters/TestCaseFilters.asset # com.unity.render-pipelines.universal/CHANGELOG.md * fixed merge conflict * GC fix (#1227490) (#6228) * Fixed GC pressure in volume component's GetHashCode * Changelog update * Update com.unity.render-pipelines.core/CHANGELOG.md Co-Authored-By: Felipe Lira <felipedrl@gmail.com> Co-authored-by: Felipe Lira <felipedrl@gmail.com> * Added CopyImagesToReferenceFolder file. * merged and updated reference images Co-authored-by: Thomas <Chman@users.noreply.github.com>
phi-lira
added a commit
that referenced
this pull request
May 27, 2020
* Fixed quality settings v2. (#181) * Universal Bugfixes (#6109) * Fixed shader pass name issue (case 1201696) * Fixed typo in encodedIrradiance. * Fixed viewport rect not working with render textures. * Added changelog * Enabled Allocations tests when rendering. * Forward Renderer is not sealed anymore. Now developers can subclass it. * Added Test Scene * Excluded post-processing tests from build. * Enabled playmode tests for all assemblies * Removed unnecessary new shader. UnlitTexture is used instead. * Updated reference images. * Updated scene to fix tests. # Conflicts: # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/Android/OpenGLES3/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/Android/OpenGLES3/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/Android/Vulkan/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/Android/Vulkan/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/LinuxEditor/OpenGLCore/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/LinuxEditor/OpenGLCore/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXEditor/Metal/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXEditor/Metal/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXEditor/OpenGLCore/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXEditor/OpenGLCore/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXPlayer/Metal/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXPlayer/Metal/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXPlayer/OpenGLCore/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXPlayer/OpenGLCore/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/127_ClearRenderTexture.png.meta # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsPlayer/Vulkan/127_ClearRenderTexture.png # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/WindowsPlayer/Vulkan/127_ClearRenderTexture.png.meta # com.unity.render-pipelines.universal/CHANGELOG.md # Conflicts: # TestProjects/UniversalGraphicsTest/ProjectSettings/ProjectSettings.asset # com.unity.render-pipelines.universal/CHANGELOG.md # com.unity.render-pipelines.universal/Runtime/ForwardRenderer.cs * Post-processing is not causing GC alloc anymore. (#192) * [9.x.x] Fix allocation caused when sorting cameras in URP. (#268) * Fixed allocation caused by camera sort. * Added changelog. # Conflicts: # com.unity.render-pipelines.universal/CHANGELOG.md * [9.x.x] Fix computation of inverseVP matrix. (#374) * Fixed issue that caused wrong computation of unity inverse view and projection matrix. * Added graphics tests. * filtered test 130 from android due to trunk issues. # Conflicts: # TestProjects/UniversalGraphicsTest/ProjectSettings/EditorBuildSettings.asset # com.unity.render-pipelines.universal/CHANGELOG.md * fixed merge conflict * added missing reference images * GC fix (#1227490) (#6228) * Fixed GC pressure in volume component's GetHashCode * Changelog update * Update com.unity.render-pipelines.core/CHANGELOG.md Co-Authored-By: Felipe Lira <felipedrl@gmail.com> Co-authored-by: Felipe Lira <felipedrl@gmail.com> * [9.x.x] updated terrain scene and reference images. (#460) * updated terrain scene and reference images. * Reverted non OSX Metal images This reverts commit 1cba18b. # Conflicts: # TestProjects/UniversalGraphicsTest/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/035_Shader_TerrainShaders.png.meta Co-authored-by: Thomas <Chman@users.noreply.github.com>
PaulDemeulenaere
added a commit
that referenced
this pull request
Jul 27, 2021
* Add editor test to cover case 1352832 * Minor improve test checking connection * Fix VFXParameter relink However, this behavior is still pretty hacky but if we are relying on this code, it has to be smarter link closest operator to vfxnode * Clarify search of closest position * Fix closest block ignoring block position * Rename UpdateLinkSlotManualConversion => ConvertExpressionsFromLink Fix conversation https://github.cds.internal.unity3d.com/unity/vfx-graphics/pull/258#discussion_r162849 * *Update changelog.md
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose of this PR
Fix allocation caused when sorting cameras in URP.
case 1226448
Testing status
Manual Tests: Validated that the fix works by profiling allocations in the Unity Profiler.
Automated Tests: We already have GC alloc automated tests for URP, however the test framework only tests the main camera in isolation by using camera.Render(). We need to improve the test framework to support catching GC alloc in a the SRP Render callback.
Comments to reviewers
IComparer was causing allocation in ArraySortHelper. Replaced with a cached IComparison delegate.