Skip to content

Restore some XR HDRP tests #382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7160,16 +7160,6 @@ PrefabInstance:
propertyPath: ImageComparisonSettings.TargetHeight
value: 720
objectReference: {fileID: 0}
- target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: xrThresholdMultiplier
value: 2
objectReference: {fileID: 0}
- target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: xrCompatible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: ImageComparisonSettings.AverageCorrectnessThreshold
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Material: {fileID: 2100000, guid: a3cf16179af19304a86953a01f59cf4d, type: 2}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
Expand Down Expand Up @@ -901,11 +901,6 @@ PrefabInstance:
propertyPath: checkMemoryAllocation
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: xrCompatible
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3}
--- !u!20 &1172859778 stripped
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2128,16 +2128,6 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: xrLayout
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: xrThresholdMultiplier
value: 3
objectReference: {fileID: 0}
- target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: m_Version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3636,11 +3636,6 @@ PrefabInstance:
propertyPath: captureFramerate
value: 30
objectReference: {fileID: 0}
- target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: xrCompatible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: ImageComparisonSettings.TargetWidth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3706,11 +3706,6 @@ PrefabInstance:
propertyPath: ImageComparisonSettings.TargetWidth
value: 640
objectReference: {fileID: 0}
- target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: xrThresholdMultiplier
value: 2
objectReference: {fileID: 0}
- target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: m_Version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -966,16 +966,6 @@ PrefabInstance:
propertyPath: near clip plane
value: 147
objectReference: {fileID: 0}
- target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: xrLayout
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: xrThresholdMultiplier
value: 5
objectReference: {fileID: 0}
- target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: clearColorMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1523,11 +1523,6 @@ PrefabInstance:
propertyPath: near clip plane
value: 10
objectReference: {fileID: 0}
- target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: xrThresholdMultiplier
value: 1.2
objectReference: {fileID: 0}
- target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: clearColorMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1139,11 +1139,6 @@ PrefabInstance:
propertyPath: xrLayout
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: xrThresholdMultiplier
value: 4
objectReference: {fileID: 0}
- target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: m_Version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3713,11 +3713,6 @@ PrefabInstance:
propertyPath: xrLayout
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42,
type: 3}
propertyPath: xrThresholdMultiplier
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42,
type: 3}
propertyPath: compareSGtoBI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7772,16 +7772,6 @@ PrefabInstance:
propertyPath: xrLayout
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42,
type: 3}
propertyPath: xrThresholdMultiplier
value: 2
objectReference: {fileID: 0}
- target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42,
type: 3}
propertyPath: xrCompatible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3711618258570137585, guid: 5f639aeb2b271eb458c4303b4c365c42,
type: 3}
propertyPath: compareSGtoBI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ internal static void XRSystemInit()
{
displayList[i].disableLegacyRenderer = true;
displayList[i].sRGB = true;
displayList[i].textureLayout = XRDisplaySubsystem.TextureLayout.Texture2DArray;
}
}
#endif
Expand Down
12 changes: 10 additions & 2 deletions com.unity.testing.hdrp/TestRunner/HDRP_GraphicTestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.TestTools;
using UnityEngine.TestTools.Graphics;
using UnityEngine.Rendering.HighDefinition;
Expand All @@ -13,6 +14,7 @@ public class HDRP_GraphicTestRunner
{
[PrebuildSetup("SetupGraphicsTestCases")]
[UseGraphicsTestCases]
[Timeout(300 * 1000)] // Set timeout to 5 minutes to handle complex scenes with many shaders (default timeout is 3 minutes)
public IEnumerator Run(GraphicsTestCase testCase)
{
SceneManager.LoadScene(testCase.ScenePath);
Expand Down Expand Up @@ -42,11 +44,17 @@ public IEnumerator Run(GraphicsTestCase testCase)
// Increase tolerance to account for slight changes due to float precision
settings.ImageComparisonSettings.AverageCorrectnessThreshold *= settings.xrThresholdMultiplier;
settings.ImageComparisonSettings.PerPixelCorrectnessThreshold *= settings.xrThresholdMultiplier;

// Increase number of volumetric slices to compensate for initial half-resolution due to XR single-pass optimization
foreach (var volume in GameObject.FindObjectsOfType<Volume>())
{
if (volume.profile.TryGet<Fog>(out Fog fog))
fog.volumeSliceCount.value *= 2;
}
}
else
{
// Skip incompatible XR tests
yield break;
Assert.Ignore("Test scene is not compatible with XR and will be skipped.");
}
}

Expand Down