Skip to content

Commit 2225d24

Browse files
RoseHirigoyenEvergreen
authored andcommitted
Re-Enable Graphics_Terrain RenderGraph Error Tests
1 parent d2c9ff6 commit 2225d24

5 files changed

Lines changed: 38 additions & 7 deletions

File tree

Tests/SRPTests/Projects/UniversalGraphicsTest_Terrain/Assets/CommonAssets/MotionVectorVisualization/CaptureMotionVectorsPass.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,18 @@ public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer
4949
UniversalResourceData resourceData = frameData.Get<UniversalResourceData>();
5050
UniversalCameraData cameraData = frameData.Get<UniversalCameraData>();
5151

52-
using (var builder = renderGraph.AddRenderPass<PassData>("Capture Motion Vector Pass", out var passData, s_ProfilingSampler))
52+
using (var builder = renderGraph.AddUnsafePass<PassData>("Capture Motion Vector Pass", out var passData, s_ProfilingSampler))
5353
{
54-
TextureHandle color = resourceData.activeColorTexture;
55-
passData.target = builder.UseColorBuffer(color, 0);
54+
passData.target = resourceData.activeColorTexture;
55+
builder.SetRenderAttachment(passData.target, 0);
5656
passData.isGameCamera = cameraData.camera.cameraType == CameraType.Game;
5757
passData.material = m_Material;
5858
passData.intensity = m_intensity;
5959

60-
builder.SetRenderFunc((PassData data, RenderGraphContext rgContext) =>
60+
builder.SetRenderFunc((PassData data, UnsafeGraphContext rgContext) =>
6161
{
62-
ExecutePass(data.target, rgContext.cmd, data.isGameCamera, data.material, data.intensity);
62+
var nativeCmd = CommandBufferHelpers.GetNativeCommandBuffer(rgContext.cmd);
63+
ExecutePass(data.target, nativeCmd, data.isGameCamera, data.material, data.intensity);
6364
});
6465
}
6566
}

Tests/SRPTests/Projects/UniversalGraphicsTest_Terrain/Assets/Scenes/198_DepthPrimingDepthPrepass.unity

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ MonoBehaviour:
245245
m_Name:
246246
m_EditorClassIdentifier:
247247
ImageComparisonSettings:
248-
TargetWidth: 640
249-
TargetHeight: 360
248+
TargetWidth: 1920
249+
TargetHeight: 1080
250250
TargetMSAASamples: 1
251251
PerPixelCorrectnessThreshold: 0.0059
252252
PerPixelGammaThreshold: 0.0059

Tests/SRPTests/Projects/UniversalGraphicsTest_Terrain/Assets/Scenes/300_Motion_Vectors_SpeedTree.unity

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,8 +1315,18 @@ PrefabInstance:
13151315
- target: {fileID: 5925587397941101150, guid: a477888deb65a194793f87af3323de08,
13161316
type: 3}
13171317
propertyPath: SetBackBufferResolution
1318+
value: 0
1319+
objectReference: {fileID: 0}
1320+
- target: {fileID: 5925587397941101150, guid: a477888deb65a194793f87af3323de08,
1321+
type: 3}
1322+
propertyPath: ImageComparisonSettings.UseBackBuffer
13181323
value: 1
13191324
objectReference: {fileID: 0}
1325+
- target: {fileID: 5925587397941101150, guid: a477888deb65a194793f87af3323de08,
1326+
type: 3}
1327+
propertyPath: ImageComparisonSettings.ImageResolution
1328+
value: 0
1329+
objectReference: {fileID: 0}
13201330
- target: {fileID: 6456975910273469994, guid: a477888deb65a194793f87af3323de08,
13211331
type: 3}
13221332
propertyPath: m_Name

Tests/SRPTests/Projects/UniversalGraphicsTest_Terrain/Assets/Scenes/301_Motion_Vectors_SpeedTree_Terrain.unity

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,18 @@ PrefabInstance:
238238
- target: {fileID: 5925587397941101150, guid: a477888deb65a194793f87af3323de08,
239239
type: 3}
240240
propertyPath: SetBackBufferResolution
241+
value: 0
242+
objectReference: {fileID: 0}
243+
- target: {fileID: 5925587397941101150, guid: a477888deb65a194793f87af3323de08,
244+
type: 3}
245+
propertyPath: ImageComparisonSettings.UseBackBuffer
241246
value: 1
242247
objectReference: {fileID: 0}
248+
- target: {fileID: 5925587397941101150, guid: a477888deb65a194793f87af3323de08,
249+
type: 3}
250+
propertyPath: ImageComparisonSettings.ImageResolution
251+
value: 0
252+
objectReference: {fileID: 0}
243253
- target: {fileID: 6456975910273469994, guid: a477888deb65a194793f87af3323de08,
244254
type: 3}
245255
propertyPath: m_Name

Tests/SRPTests/Projects/UniversalGraphicsTest_Terrain/Assets/Scenes/302_Motion_Vectors_Terrain_DetailMesh.unity

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,16 @@ PrefabInstance:
183183
propertyPath: m_NormalizedViewPortRect.height
184184
value: 10
185185
objectReference: {fileID: 0}
186+
- target: {fileID: 5925587397941101150, guid: a477888deb65a194793f87af3323de08,
187+
type: 3}
188+
propertyPath: ImageComparisonSettings.UseBackBuffer
189+
value: 1
190+
objectReference: {fileID: 0}
191+
- target: {fileID: 5925587397941101150, guid: a477888deb65a194793f87af3323de08,
192+
type: 3}
193+
propertyPath: ImageComparisonSettings.ImageResolution
194+
value: 0
195+
objectReference: {fileID: 0}
186196
- target: {fileID: 6456975910273469994, guid: a477888deb65a194793f87af3323de08,
187197
type: 3}
188198
propertyPath: m_Name

0 commit comments

Comments
 (0)