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
Clear Global Render Graph Texture Bindings After Execution
This change adds logic to render graph that clears global texture bindings after execution. This behavior prevents code that follows the render graph execution from depending on resources that are only valid within the graph's scope. The behavior is controlled via a C# define for now because it uncovers several other issues that need to be resolved before this is enabled unconditionally.
This PR is an temporary change that's a prerequisite for fixing UUM-74470.
It has no functional impact when the C# define is not set.
Copy file name to clipboardExpand all lines: Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/IRenderGraphBuilder.cs
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,8 @@ public interface IBaseRenderGraphBuilder : IDisposable
46
46
/// Although counter-intuitive at first, this call doesn't actually have a dependency on the passed in texture handle. It's only when a subsequent pass has
47
47
/// a dependency on the global texture slot that subsequent pass will get a dependency on the currently set global texture for that slot. This means
48
48
/// globals slots can be set without overhead if you're unsure if a resource will be used or not, the graph will still maintain the correct lifetimes.
49
+
///
50
+
/// NOTE: When the `RENDER_GRAPH_CLEAR_GLOBALS` define is set, all shader bindings set through this function will be cleared once graph execution completes.
49
51
/// </summary>
50
52
/// <param name="input">The texture value to set in the global texture slot. This can be an null handle to clear the global texture slot.</param>
51
53
/// <param name="propertyId">The global texture slot to set the value for. Use Shader.PropertyToID to generate the id.</param>
0 commit comments