3
3
using System . Diagnostics ;
4
4
using System . Runtime . CompilerServices ;
5
5
using UnityEngine . Experimental . Rendering ;
6
+ using UnityEngine . Scripting . APIUpdating ;
6
7
// Typedef for the in-engine RendererList API (to avoid conflicts with the experimental version)
7
8
using CoreRendererListDesc = UnityEngine . Rendering . RendererUtils . RendererListDesc ;
8
9
@@ -11,7 +12,7 @@ namespace UnityEngine.Rendering.RenderGraphModule
11
12
/// <summary>
12
13
/// Sets the read and write access for the depth buffer.
13
14
/// </summary>
14
- [ Flags ]
15
+ [ Flags ] [ MovedFrom ( true , "UnityEngine.Experimental.Rendering.RenderGraphModule" , "UnityEngine.Rendering.RenderGraphModule" ) ]
15
16
public enum DepthAccess
16
17
{
17
18
///<summary>Read Access.</summary>
@@ -25,7 +26,7 @@ public enum DepthAccess
25
26
/// <summary>
26
27
/// Express the operations the rendergraph pass will do on a resource.
27
28
/// </summary>
28
- [ Flags ]
29
+ [ Flags ] [ MovedFrom ( true , "UnityEngine.Experimental.Rendering.RenderGraphModule" , "UnityEngine.Rendering.RenderGraphModule" ) ]
29
30
public enum AccessFlags
30
31
{
31
32
///<summary>The pass does not access the resource at all. Calling Use* functions with none has no effect.</summary>
@@ -51,6 +52,7 @@ public enum AccessFlags
51
52
/// An object representing the internal context of a rendergraph pass execution.
52
53
/// This object is public for technical reasons only and should not be used.
53
54
/// </summary>
55
+ [ MovedFrom ( true , "UnityEngine.Experimental.Rendering.RenderGraphModule" , "UnityEngine.Rendering.RenderGraphModule" ) ]
54
56
public class InternalRenderGraphContext
55
57
{
56
58
internal ScriptableRenderContext renderContext ;
@@ -83,6 +85,7 @@ internal interface IDerivedRendergraphContext
83
85
/// command buffer that can be used to schedule all commands. This will eventually be deprecated
84
86
/// in favor of more specific contexts that have more specific command buffer types.
85
87
/// </summary>
88
+ [ MovedFrom ( true , "UnityEngine.Experimental.Rendering.RenderGraphModule" , "UnityEngine.Rendering.RenderGraphModule" ) ]
86
89
public struct RenderGraphContext : IDerivedRendergraphContext
87
90
{
88
91
private InternalRenderGraphContext wrappedContext ;
@@ -107,6 +110,7 @@ public void FromInternalContext(InternalRenderGraphContext context)
107
110
/// This class declares the context object passed to the execute function of a raster render pass.
108
111
/// <see cref="RenderGraph.AddRasterRenderPass"/>
109
112
/// </summary>
113
+ [ MovedFrom ( true , "UnityEngine.Experimental.Rendering.RenderGraphModule" , "UnityEngine.Rendering.RenderGraphModule" ) ]
110
114
public struct RasterGraphContext : IDerivedRendergraphContext
111
115
{
112
116
private InternalRenderGraphContext wrappedContext ;
@@ -135,6 +139,7 @@ public void FromInternalContext(InternalRenderGraphContext context)
135
139
/// This class declares the context object passed to the execute function of a compute render pass.
136
140
/// <see cref="RenderGraph.AddComputePass"/>
137
141
/// </summary>
142
+ [ MovedFrom ( true , "UnityEngine.Experimental.Rendering.RenderGraphModule" , "UnityEngine.Rendering.RenderGraphModule" ) ]
138
143
public class ComputeGraphContext : IDerivedRendergraphContext
139
144
{
140
145
private InternalRenderGraphContext wrappedContext ;
@@ -164,6 +169,7 @@ public void FromInternalContext(InternalRenderGraphContext context)
164
169
/// This class declares the context object passed to the execute function of an unsafe render pass.
165
170
/// <see cref="RenderGraph.AddUnsafePass"/>
166
171
/// </summary>
172
+ [ MovedFrom ( true , "UnityEngine.Experimental.Rendering.RenderGraphModule" , "UnityEngine.Rendering.RenderGraphModule" ) ]
167
173
public class UnsafeGraphContext : IDerivedRendergraphContext
168
174
{
169
175
private InternalRenderGraphContext wrappedContext ;
@@ -191,6 +197,7 @@ public void FromInternalContext(InternalRenderGraphContext context)
191
197
/// <summary>
192
198
/// This struct contains properties which control the execution of the Render Graph.
193
199
/// </summary>
200
+ [ MovedFrom ( true , "UnityEngine.Experimental.Rendering.RenderGraphModule" , "UnityEngine.Rendering.RenderGraphModule" ) ]
194
201
public struct RenderGraphParameters
195
202
{
196
203
///<summary>Identifier for this render graph execution.</summary>
@@ -216,12 +223,14 @@ public struct RenderGraphParameters
216
223
/// <typeparam name="ContextType">The type of the context that will be passed to the render function.</typeparam>
217
224
/// <param name="data">Render Pass specific data.</param>
218
225
/// <param name="renderGraphContext">Global Render Graph context.</param>
226
+ [ MovedFrom ( true , "UnityEngine.Experimental.Rendering.RenderGraphModule" , "UnityEngine.Rendering.RenderGraphModule" ) ]
219
227
public delegate void BaseRenderFunc < PassData , ContextType > ( PassData data , ContextType renderGraphContext ) where PassData : class , new ( ) ;
220
228
221
229
222
230
/// <summary>
223
231
/// This class is the main entry point of the Render Graph system.
224
232
/// </summary>
233
+ [ MovedFrom ( true , "UnityEngine.Experimental.Rendering.RenderGraphModule" , "UnityEngine.Rendering.RenderGraphModule" ) ]
225
234
public partial class RenderGraph
226
235
{
227
236
///<summary>Maximum number of MRTs supported by Render Graph.</summary>
@@ -2148,7 +2157,7 @@ void PreRenderPassSetRenderTargets(in CompiledPassInfo passInfo, RenderGraphPass
2148
2157
else
2149
2158
{
2150
2159
throw new InvalidOperationException ( "Setting MRTs without a depth buffer is not supported." ) ;
2151
- }
2160
+ }
2152
2161
}
2153
2162
else
2154
2163
{
@@ -2547,15 +2556,17 @@ internal TextureHandle GetGlobal(int globalPropertyId)
2547
2556
}
2548
2557
}
2549
2558
2550
- #if DEVELOPMENT_BUILD || UNITY_EDITOR
2551
2559
/// <summary>
2552
2560
/// Render Graph Scoped Profiling markers
2553
2561
/// </summary>
2562
+ [ MovedFrom ( true , "UnityEngine.Experimental.Rendering.RenderGraphModule" , "UnityEngine.Rendering.RenderGraphModule" ) ]
2554
2563
public struct RenderGraphProfilingScope : IDisposable
2555
2564
{
2565
+ #if DEVELOPMENT_BUILD || UNITY_EDITOR
2556
2566
ProfilingSampler m_Sampler ;
2557
2567
RenderGraph m_RenderGraph ;
2558
2568
bool m_Disposed ;
2569
+ #endif
2559
2570
2560
2571
/// <summary>
2561
2572
/// Profiling Scope constructor
@@ -2564,10 +2575,12 @@ public struct RenderGraphProfilingScope : IDisposable
2564
2575
/// <param name="sampler">Profiling Sampler to be used for this scope.</param>
2565
2576
public RenderGraphProfilingScope ( RenderGraph renderGraph , ProfilingSampler sampler )
2566
2577
{
2578
+ #if DEVELOPMENT_BUILD || UNITY_EDITOR
2567
2579
m_RenderGraph = renderGraph ;
2568
2580
m_Sampler = sampler ;
2569
2581
m_Disposed = false ;
2570
2582
renderGraph . BeginProfilingSampler ( sampler ) ;
2583
+ #endif
2571
2584
}
2572
2585
2573
2586
/// <summary>
@@ -2581,6 +2594,7 @@ public void Dispose()
2581
2594
// Protected implementation of Dispose pattern.
2582
2595
void Dispose ( bool disposing )
2583
2596
{
2597
+ #if DEVELOPMENT_BUILD || UNITY_EDITOR
2584
2598
if ( m_Disposed )
2585
2599
return ;
2586
2600
@@ -2593,34 +2607,7 @@ void Dispose(bool disposing)
2593
2607
}
2594
2608
2595
2609
m_Disposed = true ;
2610
+ #endif
2596
2611
}
2597
2612
}
2598
- #else
2599
- /// <summary>
2600
- /// Render Graph Scoped Profiling markers
2601
- /// </summary>
2602
- public struct RenderGraphProfilingScope : IDisposable
2603
- {
2604
- /// <summary>
2605
- /// Profiling Scope constructor
2606
- /// </summary>
2607
- /// <param name="renderGraph">Render Graph used for this scope.</param>
2608
- /// <param name="sampler">Profiling Sampler to be used for this scope.</param>
2609
- public RenderGraphProfilingScope ( RenderGraph renderGraph , ProfilingSampler sampler )
2610
- {
2611
- }
2612
-
2613
- /// <summary>
2614
- /// Dispose pattern implementation
2615
- /// </summary>
2616
- public void Dispose ( )
2617
- {
2618
- }
2619
-
2620
- // Protected implementation of Dispose pattern.
2621
- void Dispose ( bool disposing )
2622
- {
2623
- }
2624
- }
2625
- #endif
2626
2613
}
0 commit comments