You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hybrid Renderer Command Buffer: Unique systems on system name and world name - it is valid for a system to push commands independantly from multiple worlds. Force an immediate mode submit of the command buffer if we encounter a case where the HDRenderPipeline has not submitted the command buffer before the system updates again - this can happen in edge cases. (#70)
Copy file name to clipboardExpand all lines: com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.HybridRendererCommandBuffer.cs
+82-32Lines changed: 82 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -18,30 +18,33 @@ public partial class HDRenderPipeline : RenderPipeline
// Encountered previous frame data, or a system from another world updating.
118
+
// In the editor, there are a few edge cases where this can happen, such as changes to Project Settings (oddly enough).
119
+
// Simply submit the command buffer immediately, and do not log any warnings.
120
+
// If we are in a build, this case is unexpected, so we log a warning.
121
+
SubmitImmediate();
122
+
123
+
#if !UNITY_EDITOR
124
+
Debug.LogWarning("Warning: HybridRendererCommandBuffer: Encountered unexpected case of a command buffer having not been submitted between Simulation Update loops. It should have been submitted in the HDRenderPipeline::Render() loop.");
Debug.AssertFormat(submitted==false,"Error: Encountered Hybrid Rendering System {0} with an already submitted command buffer. Was End() already called in this Simulation Update?",profilingSamplers[handle.systemID].name);
101
139
}
102
140
else
103
141
{
104
-
Debug.Assert(false);
142
+
Debug.AssertFormat(false,"Error: Encountered Hybrid Rendering System {0} End() call with no Begin() call.",profilingSamplers[handle.systemID].name);
0 commit comments