@@ -28,30 +28,22 @@ public class UniversalGraphicsTestBase
2828 protected readonly GpuResidentDrawerContext requestedGRDContext ;
2929 protected readonly GpuResidentDrawerContext previousGRDContext ;
3030
31- protected readonly StereoRenderingGlobalContext stereoRenderingContext ;
32- protected readonly StereoRenderingContext requestedXRContext ;
33- protected readonly StereoRenderingContext previousXRContext ;
34-
3531 public UniversalGraphicsTestBase ( RenderGraphContext rgContext )
36- : this ( rgContext , GpuResidentDrawerContext . None , StereoRenderingContext . None )
32+ : this ( rgContext , GpuResidentDrawerContext . None )
3733 {
3834 requestedGRDContext = previousGRDContext ;
39- requestedXRContext = previousXRContext ;
4035
4136 GraphicsTestLogger . DebugLog ( $ "RenderGraphContext: { requestedRGContext } ") ;
4237 GraphicsTestLogger . DebugLog ( $ "GpuResidentDrawerContext: { requestedGRDContext } ") ;
43- GraphicsTestLogger . DebugLog ( $ "StereoRenderingContext: { requestedXRContext } ") ;
4438 }
4539
4640 public UniversalGraphicsTestBase (
4741 RenderGraphContext rgContext ,
48- GpuResidentDrawerContext grdContext ,
49- StereoRenderingContext xrContext
42+ GpuResidentDrawerContext grdContext
5043 )
5144 {
5245 requestedRGContext = rgContext ;
5346 requestedGRDContext = grdContext ;
54- requestedXRContext = xrContext ;
5547
5648 // Register context
5749 renderGraphContext =
@@ -62,19 +54,13 @@ StereoRenderingContext xrContext
6254 GlobalContextManager . RegisterGlobalContext ( typeof ( GpuResidentDrawerGlobalContext ) )
6355 as GpuResidentDrawerGlobalContext ;
6456
65- stereoRenderingContext =
66- GlobalContextManager . RegisterGlobalContext ( typeof ( StereoRenderingGlobalContext ) )
67- as StereoRenderingGlobalContext ;
68-
6957 // Cache previous state to avoid state leak
7058 previousRGContext = ( RenderGraphContext ) renderGraphContext . Context ;
7159 previousGRDContext = ( GpuResidentDrawerContext ) gpuResidentDrawerContext . Context ;
72- previousXRContext = ( StereoRenderingContext ) stereoRenderingContext . Context ;
7360
7461 // Activate new context
7562 renderGraphContext . ActivateContext ( requestedRGContext ) ;
7663 gpuResidentDrawerContext . ActivateContext ( requestedGRDContext ) ;
77- stereoRenderingContext . ActivateContext ( requestedXRContext ) ;
7864 }
7965
8066 [ OneTimeSetUp ]
@@ -94,7 +80,6 @@ public void SetUpContext()
9480 {
9581 renderGraphContext . ActivateContext ( requestedRGContext ) ;
9682 gpuResidentDrawerContext . ActivateContext ( requestedGRDContext ) ;
97- stereoRenderingContext . ActivateContext ( requestedXRContext ) ;
9883
9984 Assert . That (
10085 GlobalContextManager . GetGlobalContext < RenderGraphGlobalContext > ( ) ? . Context ,
@@ -107,12 +92,6 @@ public void SetUpContext()
10792 Is . EqualTo ( ( int ) requestedGRDContext ) ,
10893 $ "Expected { requestedGRDContext } but was { ( GpuResidentDrawerContext ) GlobalContextManager . GetGlobalContext < GpuResidentDrawerGlobalContext > ( ) ? . Context } "
10994 ) ;
110-
111- Assert . That (
112- GlobalContextManager . GetGlobalContext < StereoRenderingGlobalContext > ( ) ? . Context ,
113- Is . EqualTo ( ( int ) requestedXRContext ) ,
114- $ "Expected { requestedXRContext } but was { ( StereoRenderingContext ) GlobalContextManager . GetGlobalContext < StereoRenderingGlobalContext > ( ) ? . Context } "
115- ) ;
11695 }
11796
11897 [ TearDown ]
@@ -138,12 +117,6 @@ public void TearDown()
138117 ) ;
139118 }
140119
141- Assert . That (
142- GlobalContextManager . GetGlobalContext < StereoRenderingGlobalContext > ( ) ? . Context ,
143- Is . EqualTo ( ( int ) requestedXRContext ) ,
144- $ "Expected { requestedXRContext } but was { ( StereoRenderingContext ) GlobalContextManager . GetGlobalContext < StereoRenderingGlobalContext > ( ) ? . Context } "
145- ) ;
146-
147120 Debug . ClearDeveloperConsole ( ) ;
148121#if ENABLE_VR
149122 XRGraphicsAutomatedTests . running = false ;
@@ -157,11 +130,9 @@ public void OneTimeTearDown()
157130
158131 renderGraphContext . ActivateContext ( previousRGContext ) ;
159132 gpuResidentDrawerContext . ActivateContext ( previousGRDContext ) ;
160- stereoRenderingContext . ActivateContext ( previousXRContext ) ;
161133
162134 GlobalContextManager . UnregisterGlobalContext ( typeof ( RenderGraphGlobalContext ) ) ;
163135 GlobalContextManager . UnregisterGlobalContext ( typeof ( GpuResidentDrawerGlobalContext ) ) ;
164- GlobalContextManager . UnregisterGlobalContext ( typeof ( StereoRenderingGlobalContext ) ) ;
165136 }
166137 }
167138
@@ -173,61 +144,24 @@ public static IEnumerable FixtureParams
173144 {
174145 yield return new TestFixtureData (
175146 RenderGraphContext . CompatibilityMode ,
176- GpuResidentDrawerContext . GpuResidentDrawerDisabled ,
177- StereoRenderingContext . StereoRenderingDisabled
147+ GpuResidentDrawerContext . GpuResidentDrawerDisabled
178148 ) ;
179149
180150 yield return new TestFixtureData (
181151 RenderGraphContext . RenderGraphMode ,
182- GpuResidentDrawerContext . GpuResidentDrawerDisabled ,
183- StereoRenderingContext . StereoRenderingDisabled
152+ GpuResidentDrawerContext . GpuResidentDrawerDisabled
184153 ) ;
185154
186155 if ( GraphicsTestPlatform . Current . IsEditorPlatform )
187156 {
188157 yield return new TestFixtureData (
189158 RenderGraphContext . CompatibilityMode ,
190- GpuResidentDrawerContext . GpuResidentDrawerInstancedDrawing ,
191- StereoRenderingContext . StereoRenderingDisabled
192- ) ;
193-
194- yield return new TestFixtureData (
195- RenderGraphContext . RenderGraphMode ,
196- GpuResidentDrawerContext . GpuResidentDrawerInstancedDrawing ,
197- StereoRenderingContext . StereoRenderingDisabled
198- ) ;
199- }
200-
201- if ( GraphicsTestPlatform . Current . Platform == RuntimePlatform . WindowsEditor )
202- {
203- yield return new TestFixtureData (
204- RenderGraphContext . CompatibilityMode ,
205- GpuResidentDrawerContext . GpuResidentDrawerInstancedDrawing ,
206- StereoRenderingContext . StereoRenderingEnabled
207- ) ;
208-
209- yield return new TestFixtureData (
210- RenderGraphContext . RenderGraphMode ,
211- GpuResidentDrawerContext . GpuResidentDrawerInstancedDrawing ,
212- StereoRenderingContext . StereoRenderingEnabled
213- ) ;
214- }
215-
216- if (
217- GraphicsTestPlatform . Current . Platform == RuntimePlatform . WindowsPlayer
218- || GraphicsTestPlatform . Current . Platform == RuntimePlatform . WindowsEditor
219- )
220- {
221- yield return new TestFixtureData (
222- RenderGraphContext . CompatibilityMode ,
223- GpuResidentDrawerContext . GpuResidentDrawerDisabled ,
224- StereoRenderingContext . StereoRenderingEnabled
159+ GpuResidentDrawerContext . GpuResidentDrawerInstancedDrawing
225160 ) ;
226161
227162 yield return new TestFixtureData (
228163 RenderGraphContext . RenderGraphMode ,
229- GpuResidentDrawerContext . GpuResidentDrawerDisabled ,
230- StereoRenderingContext . StereoRenderingEnabled
164+ GpuResidentDrawerContext . GpuResidentDrawerInstancedDrawing
231165 ) ;
232166 }
233167 }
0 commit comments