From fe71e676c0779979fcfc0983c1dee17485cd6ede Mon Sep 17 00:00:00 2001 From: Fabien Houlmann Date: Thu, 7 Jan 2021 12:32:55 -0500 Subject: [PATCH 01/12] update HDRP code to use MockHMD while running XR automated tests --- .../HDRenderPipeline.RenderGraph.cs | 2 +- .../HDRenderPipeline.RenderGraphUtils.cs | 2 +- .../RenderPipeline/HDRenderPipeline.cs | 2 +- .../Runtime/RenderPipeline/XR/XRPass.cs | 27 ++++++ .../Runtime/RenderPipeline/XR/XRSystem.cs | 86 ++++++++----------- 5 files changed, 68 insertions(+), 51 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs index bc0be083191..6aa6c8770f5 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs @@ -270,7 +270,7 @@ void ExecuteWithRenderGraph(RenderRequest renderRequest, RenderCustomPass(m_RenderGraph, hdCamera, postProcessDest, prepassOutput, customPassCullingResults, cullingResults, CustomPassInjectionPoint.AfterPostProcess, aovRequest, aovCustomPassBuffers); - CopyXRDepth(m_RenderGraph, hdCamera, prepassOutput.depthBuffer, backBuffer); + CopyXRDepth(m_RenderGraph, hdCamera, prepassOutput.resolvedDepthBuffer, backBuffer); // In developer build, we always render post process in an intermediate buffer at (0,0) in which we will then render debug. // Because of this, we need another blit here to the final render target at the right viewport. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraphUtils.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraphUtils.cs index 71beea1e8b1..4e6df80af1f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraphUtils.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraphUtils.cs @@ -135,7 +135,7 @@ class RenderOcclusionMeshesPassData void RenderXROcclusionMeshes(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle colorBuffer, TextureHandle depthBuffer) { - if (hdCamera.xr.enabled && m_Asset.currentPlatformRenderPipelineSettings.xrSettings.occlusionMesh) + if (hdCamera.xr.hasValidOcclusionMesh && m_Asset.currentPlatformRenderPipelineSettings.xrSettings.occlusionMesh) { using (var builder = renderGraph.AddRenderPass("XR Occlusion Meshes", out var passData)) { diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 2ed6a137c55..40cd6d6daac 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -2311,7 +2311,7 @@ out ScriptableCullingParameters cullingParams cullingParams = hdCamera.xr.cullingParams; // Sync the FOV on the camera to match the projection from the XR device in order to cull shadows accurately - if (!camera.usePhysicalProperties) + if (!camera.usePhysicalProperties && !XRGraphicsAutomatedTests.enabled) camera.fieldOfView = Mathf.Rad2Deg * Mathf.Atan(1.0f / cullingParams.stereoProjectionMatrix.m11) * 2.0f; } else diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRPass.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRPass.cs index a077166f990..320246a04e6 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRPass.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRPass.cs @@ -152,6 +152,28 @@ internal static XRPass Create(XRPassCreateInfo createInfo) return passInfo; } + internal void UpdateView(int viewId, XRDisplaySubsystem.XRRenderPass xrSdkRenderPass, XRDisplaySubsystem.XRRenderParameter xrSdkRenderParameter) + { + if (viewId >= views.Count) + throw new NotImplementedException($"Invalid XR setup to update, trying to update non-existing xr view."); + + views[viewId] = new XRView(xrSdkRenderPass, xrSdkRenderParameter); + } + + internal void UpdateView(int viewId, Matrix4x4 proj, Matrix4x4 view, Rect vp, int textureArraySlice = -1) + { + if (viewId >= views.Count) + throw new NotImplementedException($"Invalid XR setup to update, trying to update non-existing xr view."); + + views[viewId] = new XRView(proj, view, vp, textureArraySlice); + } + + internal void UpdateCullingParams(int cullingPassId, ScriptableCullingParameters cullingParams) + { + this.cullingPassId = cullingPassId; + this.cullingParams = cullingParams; + } + internal void AddView(Matrix4x4 proj, Matrix4x4 view, Rect vp, int textureArraySlice = -1) { AddViewInternal(new XRView(proj, view, vp, textureArraySlice)); @@ -373,6 +395,11 @@ internal void EndCamera(CommandBuffer cmd, HDCamera hdCamera) internal void RenderOcclusionMeshes(CommandBuffer cmd, Color clearColor, RTHandle colorBuffer, RTHandle depthBuffer) { + #if DEVELOPMENT_BUILD || UNITY_EDITOR + if (XRGraphicsAutomatedTests.enabled && XRGraphicsAutomatedTests.running) + return; + #endif + if (isOcclusionMeshSupported) { CoreUtils.SetRenderTarget(cmd, colorBuffer, depthBuffer, ClearFlag.None, clearColor, 0, CubemapFace.Unknown, -1); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs index 7f8324d0b13..5d29dd0e776 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/XR/XRSystem.cs @@ -130,13 +130,6 @@ internal int GetMaxViews() // Enable XR layout only for gameview camera bool xrSupported = camera.cameraType == CameraType.Game && camera.targetTexture == null && HDUtils.TryGetAdditionalCameraDataOrDefault(camera).xrRendering; -#if DEVELOPMENT_BUILD || UNITY_EDITOR - if (singlePassTestMode && LayoutSinglePassTestMode(new XRLayout() { camera = camera, xrSystem = this })) - { - // single-pass test layout in used - } - else -#endif if (customLayout != null && customLayout(new XRLayout() { camera = camera, xrSystem = this })) { // custom layout in used @@ -154,6 +147,11 @@ internal int GetMaxViews() } CreateLayoutFromXrSdk(camera, singlePassAllowed); + +#if DEVELOPMENT_BUILD || UNITY_EDITOR + if (singlePassTestMode) + OverrideForAutomatedTests(camera); +#endif } #endif else @@ -357,55 +355,47 @@ void CaptureDebugInfo() } #if DEVELOPMENT_BUILD || UNITY_EDITOR - bool LayoutSinglePassTestMode(XRLayout frameLayout) + private void OverrideForAutomatedTests(Camera camera) { - Camera camera = frameLayout.camera; + var camProjMatrix = camera.projectionMatrix; + var camViewMatrix = camera.worldToCameraMatrix; - if (camera != null && camera.cameraType == CameraType.Game && camera.TryGetCullingParameters(false, out var cullingParams)) + if (camera.TryGetCullingParameters(false, out var cullingParams)) { - cullingParams.stereoProjectionMatrix = camera.projectionMatrix; - cullingParams.stereoViewMatrix = camera.worldToCameraMatrix; + cullingParams.stereoProjectionMatrix = camProjMatrix; + cullingParams.stereoViewMatrix = camViewMatrix; + cullingParams.stereoSeparationDistance = 0.0f; + cullingParams.cullingOptions &= ~CullingOptions.Stereo; - var passInfo = new XRPassCreateInfo - { - multipassId = 0, - cullingPassId = 0, - cullingParameters = cullingParams, - renderTarget = camera.targetTexture, - customMirrorView = null - }; - - var viewInfo2 = new XRViewCreateInfo - { - projMatrix = camera.projectionMatrix, - viewMatrix = camera.worldToCameraMatrix, - viewport = new Rect(camera.pixelRect.x, camera.pixelRect.y, camera.pixelWidth, camera.pixelHeight), - textureArraySlice = -1 - }; - - // Change the first view so that it's a different viewpoint and projection to detect more issues - var viewInfo1 = viewInfo2; - var planes = viewInfo1.projMatrix.decomposeProjection; - planes.left *= 0.44f; - planes.right *= 0.88f; - planes.top *= 0.11f; - planes.bottom *= 0.33f; - viewInfo1.projMatrix = Matrix4x4.Frustum(planes); - viewInfo1.viewMatrix *= Matrix4x4.Translate(new Vector3(.34f, 0.25f, -0.08f)); - - // single-pass 2x rendering + for (int passId = 0; passId < framePasses.Count; passId++) { - XRPass pass = frameLayout.CreatePass(passInfo); + var xrPass = framePasses[passId].Item2; + xrPass.UpdateCullingParams(xrPass.cullingPassId, cullingParams); - frameLayout.AddViewToPass(viewInfo1, pass); - frameLayout.AddViewToPass(viewInfo2, pass); - } + for (int viewId = 0; viewId < framePasses[passId].Item2.viewCount; viewId++) + { + var projMatrix = camProjMatrix; + var viewMatrix = camViewMatrix; - // valid layout - return true; - } + // Alter the first view in order to detect more issues + bool isFirstViewMultiPass = framePasses.Count == 2 && passId == 0; + bool isFirstViewSinglePass = framePasses.Count == 1 && viewId == 0; - return false; + if (isFirstViewMultiPass || isFirstViewSinglePass) + { + var planes = projMatrix.decomposeProjection; + planes.left *= 0.44f; + planes.right *= 0.88f; + planes.top *= 0.11f; + planes.bottom *= 0.33f; + projMatrix = Matrix4x4.Frustum(planes); + viewMatrix *= Matrix4x4.Translate(new Vector3(.34f, 0.25f, -0.08f)); + } + + xrPass.UpdateView(viewId, projMatrix, viewMatrix, xrPass.GetViewport(viewId), viewId); + } + } + } } #endif From 2e990556937c31817f5443f3f7ec94d100cb3212 Mon Sep 17 00:00:00 2001 From: Fabien Houlmann Date: Thu, 7 Jan 2021 12:33:35 -0500 Subject: [PATCH 02/12] convert HDRP TestRunner code for XR with MockHMD --- .../Setup/Assembly-CSharp-Editor.asmdef | 1 + .../Scripts/Setup/SetupGraphicsTestCases.cs | 9 ++++-- .../TestRunner/HDRP_GraphicTestRunner.cs | 29 ++++++++----------- .../TestRunner/HDRP_TestRunner.asmdef | 1 + 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/com.unity.testing.hdrp/Scripts/Setup/Assembly-CSharp-Editor.asmdef b/com.unity.testing.hdrp/Scripts/Setup/Assembly-CSharp-Editor.asmdef index ef435cd147f..c6282932487 100644 --- a/com.unity.testing.hdrp/Scripts/Setup/Assembly-CSharp-Editor.asmdef +++ b/com.unity.testing.hdrp/Scripts/Setup/Assembly-CSharp-Editor.asmdef @@ -1,6 +1,7 @@ { "name": "Assembly-CSharp-Editor-testable", "references": [ + "Unity.Testing.XR.Editor", "UnityEditor.TestTools.Graphics" ], "optionalUnityReferences": [ diff --git a/com.unity.testing.hdrp/Scripts/Setup/SetupGraphicsTestCases.cs b/com.unity.testing.hdrp/Scripts/Setup/SetupGraphicsTestCases.cs index ef3a218a0e4..4594a111f99 100644 --- a/com.unity.testing.hdrp/Scripts/Setup/SetupGraphicsTestCases.cs +++ b/com.unity.testing.hdrp/Scripts/Setup/SetupGraphicsTestCases.cs @@ -1,12 +1,15 @@ using UnityEngine.TestTools; -// Work around case #1033694, unable to use PrebuildSetup types directly from assemblies that don't have special names. -// Once that's fixed, this class can be deleted and the SetupGraphicsTestCases class in Unity.TestFramework.Graphics.Editor -// can be used directly instead. public class SetupGraphicsTestCases : IPrebuildSetup { public void Setup() { + // Work around case #1033694, unable to use PrebuildSetup types directly from assemblies that don't have special names. + // Once that's fixed, this class can be deleted and the SetupGraphicsTestCases class in Unity.TestFramework.Graphics.Editor + // can be used directly instead. UnityEditor.TestTools.Graphics.SetupGraphicsTestCases.Setup(); + + // Configure project for XR tests + Unity.Testing.XR.Editor.InjectMockHMD.SetupLoader(); } } diff --git a/com.unity.testing.hdrp/TestRunner/HDRP_GraphicTestRunner.cs b/com.unity.testing.hdrp/TestRunner/HDRP_GraphicTestRunner.cs index 5628078a5ad..effe7b43458 100644 --- a/com.unity.testing.hdrp/TestRunner/HDRP_GraphicTestRunner.cs +++ b/com.unity.testing.hdrp/TestRunner/HDRP_GraphicTestRunner.cs @@ -36,26 +36,21 @@ public IEnumerator Run(GraphicsTestCase testCase) Time.captureFramerate = settings.captureFramerate; + int waitFrames = settings.waitFrames; + if (XRGraphicsAutomatedTests.enabled) { - if (settings.xrCompatible) - { - XRGraphicsAutomatedTests.running = true; + waitFrames = Unity.Testing.XR.Runtime.ConfigureMockHMD.SetupTest(settings.xrCompatible, waitFrames, settings.ImageComparisonSettings); - // Increase tolerance to account for slight changes due to float precision - settings.ImageComparisonSettings.AverageCorrectnessThreshold *= settings.xrThresholdMultiplier; - settings.ImageComparisonSettings.PerPixelCorrectnessThreshold *= settings.xrThresholdMultiplier; + // 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()) - { - if (volume.profile.TryGet(out Fog fog)) - fog.volumeSliceCount.value *= 2; - } - } - else + // Increase number of volumetric slices to compensate for initial half-resolution due to XR single-pass optimization + foreach (var volume in GameObject.FindObjectsOfType()) { - Assert.Ignore("Test scene is not compatible with XR and will be skipped."); + if (volume.profile.TryGet(out Fog fog)) + fog.volumeSliceCount.value *= 2; } } @@ -70,7 +65,7 @@ public IEnumerator Run(GraphicsTestCase testCase) // Reset temporal effects on hdCamera HDCamera.GetOrCreate(camera).Reset(); - for (int i=0 ; i() as HDRP_ShaderGraph_TestSettings); @@ -161,7 +156,7 @@ public void DumpImagesInEditor() } [TearDown] - public void ResetSystemState() + public void TearDownXR() { XRGraphicsAutomatedTests.running = false; } diff --git a/com.unity.testing.hdrp/TestRunner/HDRP_TestRunner.asmdef b/com.unity.testing.hdrp/TestRunner/HDRP_TestRunner.asmdef index dececcbec0c..5ef778c6560 100644 --- a/com.unity.testing.hdrp/TestRunner/HDRP_TestRunner.asmdef +++ b/com.unity.testing.hdrp/TestRunner/HDRP_TestRunner.asmdef @@ -4,6 +4,7 @@ "Unity.RenderPipelines.HighDefinition.Runtime", "Unity.Postprocessing.Runtime", "Unity.RenderPipelines.Core.Runtime", + "Unity.Testing.XR.Runtime", "UnityEngine.TestTools.Graphics" ], "optionalUnityReferences": [ From ec9030ff419f075650375ca837fd6bc1bce014ea Mon Sep 17 00:00:00 2001 From: Fabien Houlmann Date: Thu, 7 Jan 2021 12:34:23 -0500 Subject: [PATCH 03/12] disable some scenes from HDRP_tests in XR --- .../1x_Materials/1102_Unlit_Distortion.unity | 5 +++++ .../1710_Decals_Normal_Patch.unity | 7 ++++++- .../1802_Depth_Pre_Post_Lit.unity | 5 +++++ .../1803_Depth_Pre_Post_LitTess.unity | 5 +++++ .../1x_Materials/1804_Depth_Pre_Post_SG.unity | 5 +++++ .../2004_Light_AnimatedCookie.unity | 4 ++++ .../2222_ReflectionProbeDistanceBased.unity | 5 +++++ .../2318_Mixed_Cached_ShadowMap_Spot.unity | 5 +++++ .../Scenes/2x_Lighting/2551_SSR.unity | 5 +++++ .../4011_MotionBlur_PerObject.unity | 5 +++++ .../4014_PrecomputedVelocityAlembic.unity | 5 +++++ .../4060_CustomPostProcess.unity | 5 +++++ .../Scenes/5x_SkyAndFog/5010_CloudLayer.unity | 5 +++++ ...107_UnlitShadowMatteAmbientOcclusion.unity | 20 +++++++++++++++++++ .../HDRP_Tests/Packages/manifest.json | 4 +++- 15 files changed, 88 insertions(+), 2 deletions(-) diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1102_Unlit_Distortion.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1102_Unlit_Distortion.unity index 88518156c35..c83994cd467 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1102_Unlit_Distortion.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1102_Unlit_Distortion.unity @@ -41224,6 +41224,11 @@ PrefabInstance: propertyPath: m_RenderingPathCustomFrameSettings.bitDatas.data1 value: 70005818916701 objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: xrThresholdMultiplier + value: 1.2 + objectReference: {fileID: 0} - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} propertyPath: ImageComparisonSettings.TargetWidth diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1710_Decals_Normal_Patch.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1710_Decals_Normal_Patch.unity index 0d526b567a8..288310cd3ea 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1710_Decals_Normal_Patch.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1710_Decals_Normal_Patch.unity @@ -968,7 +968,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &1152350158 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2099,6 +2099,11 @@ PrefabInstance: propertyPath: renderGraphCompatible value: 1 objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: xrThresholdMultiplier + value: 2 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} --- !u!1 &2135916994 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1802_Depth_Pre_Post_Lit.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1802_Depth_Pre_Post_Lit.unity index d14f433e298..8d4f5de341a 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1802_Depth_Pre_Post_Lit.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1802_Depth_Pre_Post_Lit.unity @@ -12090,6 +12090,11 @@ PrefabInstance: propertyPath: renderingPathCustomFrameSettingsOverrideMask.mask.data1 value: 16384 objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: xrThresholdMultiplier + value: 1.5 + objectReference: {fileID: 0} - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} propertyPath: ImageComparisonSettings.TargetWidth diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1803_Depth_Pre_Post_LitTess.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1803_Depth_Pre_Post_LitTess.unity index a6e60847602..f595dbc515f 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1803_Depth_Pre_Post_LitTess.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1803_Depth_Pre_Post_LitTess.unity @@ -12142,6 +12142,11 @@ PrefabInstance: propertyPath: renderingPathCustomFrameSettingsOverrideMask.mask.data1 value: 16384 objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: xrThresholdMultiplier + value: 1.5 + objectReference: {fileID: 0} - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} propertyPath: ImageComparisonSettings.TargetWidth diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1804_Depth_Pre_Post_SG.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1804_Depth_Pre_Post_SG.unity index 81e9adf75e1..391685ac186 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1804_Depth_Pre_Post_SG.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1804_Depth_Pre_Post_SG.unity @@ -3429,6 +3429,11 @@ PrefabInstance: propertyPath: renderingPathCustomFrameSettingsOverrideMask.mask.data1 value: 16384 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: ImageComparisonSettings.TargetWidth diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2004_Light_AnimatedCookie.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2004_Light_AnimatedCookie.unity index c51c3ba0857..aa416b5c54c 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2004_Light_AnimatedCookie.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2004_Light_AnimatedCookie.unity @@ -725,6 +725,10 @@ PrefabInstance: propertyPath: waitForFrames value: 3 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 value: 400 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2222_ReflectionProbeDistanceBased.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2222_ReflectionProbeDistanceBased.unity index 8c25362020e..ff3f635cd12 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2222_ReflectionProbeDistanceBased.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2222_ReflectionProbeDistanceBased.unity @@ -1090,5 +1090,10 @@ PrefabInstance: propertyPath: checkMemoryAllocation value: 0 objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: xrThresholdMultiplier + value: 1.5 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2318_Mixed_Cached_ShadowMap_Spot.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2318_Mixed_Cached_ShadowMap_Spot.unity index 6bc341de300..64ce3d4843a 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2318_Mixed_Cached_ShadowMap_Spot.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2318_Mixed_Cached_ShadowMap_Spot.unity @@ -714,6 +714,11 @@ PrefabInstance: propertyPath: m_RenderingPathCustomFrameSettings.bitDatas.data1 value: 70005818916701 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: renderPipelineAsset diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2551_SSR.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2551_SSR.unity index 7c1777e2d21..4f84bea9199 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2551_SSR.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2551_SSR.unity @@ -1054,6 +1054,11 @@ PrefabInstance: propertyPath: m_ObsoleteFrameSettings.lightLoopSettings.isFptlEnabled 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 &776213426 stripped diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4011_MotionBlur_PerObject.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4011_MotionBlur_PerObject.unity index 67383a9936f..a7ecfb6a289 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4011_MotionBlur_PerObject.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4011_MotionBlur_PerObject.unity @@ -509,6 +509,11 @@ PrefabInstance: propertyPath: waitFrames value: 40 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: doBeforeTest.m_PersistentCalls.m_Calls.Array.data[0].m_Mode diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4014_PrecomputedVelocityAlembic.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4014_PrecomputedVelocityAlembic.unity index cae875dd857..79020bc847e 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4014_PrecomputedVelocityAlembic.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4014_PrecomputedVelocityAlembic.unity @@ -3115,6 +3115,11 @@ PrefabInstance: propertyPath: waitFrames 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: captureFramerate diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4060_CustomPostProcess.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4060_CustomPostProcess.unity index 1d6c993067f..2a797a82cfb 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4060_CustomPostProcess.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/4x_PostProcessing/4060_CustomPostProcess.unity @@ -533,6 +533,11 @@ PrefabInstance: propertyPath: antialiasing 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.TargetWidth diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.unity index d4643158c09..4ccb722e24a 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.unity @@ -256,6 +256,11 @@ PrefabInstance: propertyPath: waitFrames value: 5 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 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/8x_ShaderGraph/8107_UnlitShadowMatteAmbientOcclusion.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/8x_ShaderGraph/8107_UnlitShadowMatteAmbientOcclusion.unity index ca7e95f2d3e..668f080032c 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/8x_ShaderGraph/8107_UnlitShadowMatteAmbientOcclusion.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/8x_ShaderGraph/8107_UnlitShadowMatteAmbientOcclusion.unity @@ -723,6 +723,26 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: waitFrames + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: xrThresholdMultiplier + value: 1.5 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: ImageComparisonSettings.UseBackBuffer + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: ImageComparisonSettings.ImageResolution + value: 4 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} --- !u!1 &1495890662 diff --git a/TestProjects/HDRP_Tests/Packages/manifest.json b/TestProjects/HDRP_Tests/Packages/manifest.json index c81cd61abd7..365277a17de 100644 --- a/TestProjects/HDRP_Tests/Packages/manifest.json +++ b/TestProjects/HDRP_Tests/Packages/manifest.json @@ -10,6 +10,7 @@ "com.unity.test-framework": "1.1.14", "com.unity.testframework.graphics": "7.7.1-preview", "com.unity.testing.hdrp": "file:../../../com.unity.testing.hdrp", + "com.unity.testing.xr": "file:../../../com.unity.testing.xr", "com.unity.ugui": "1.0.0", "com.unity.visualeffectgraph": "file:../../../com.unity.visualeffectgraph", "com.unity.modules.ai": "1.0.0", @@ -49,6 +50,7 @@ "com.unity.render-pipelines.core", "com.unity.render-pipelines.high-definition", "com.unity.testframework.graphics", - "com.unity.testing.hdrp" + "com.unity.testing.hdrp", + "com.unity.testing.xr" ] } \ No newline at end of file From 6c09db246a7352f4401d95b3f011e1d76cc2b8ba Mon Sep 17 00:00:00 2001 From: Fabien Houlmann Date: Thu, 7 Jan 2021 12:34:43 -0500 Subject: [PATCH 04/12] update HDRP_RuntimeTests manifest --- TestProjects/HDRP_RuntimeTests/Packages/manifest.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TestProjects/HDRP_RuntimeTests/Packages/manifest.json b/TestProjects/HDRP_RuntimeTests/Packages/manifest.json index 7b1cf53e3bc..4763f859f62 100644 --- a/TestProjects/HDRP_RuntimeTests/Packages/manifest.json +++ b/TestProjects/HDRP_RuntimeTests/Packages/manifest.json @@ -11,6 +11,7 @@ "com.unity.test-framework.utp-reporter": "1.0.2-preview", "com.unity.testframework.graphics": "7.7.1-preview", "com.unity.testing.hdrp": "file:../../../com.unity.testing.hdrp", + "com.unity.testing.xr": "file:../../../com.unity.testing.xr", "com.unity.ugui": "1.0.0", "com.unity.visualeffectgraph": "file:../../../com.unity.visualeffectgraph", "com.unity.modules.ai": "1.0.0", @@ -50,6 +51,7 @@ "com.unity.render-pipelines.core", "com.unity.render-pipelines.high-definition", "com.unity.testframework.graphics", - "com.unity.testing.hdrp" + "com.unity.testing.hdrp", + "com.unity.testing.xr" ] } \ No newline at end of file From 2edbb627da8ded6412bf3e497838a97f6ad8a2c1 Mon Sep 17 00:00:00 2001 From: Fabien Houlmann Date: Thu, 7 Jan 2021 12:35:37 -0500 Subject: [PATCH 05/12] re-enable some scenes from HDRP_DXR_Tests for XR --- ...0_RaytracingQualityKeyword_MaterialQuality_Indirect.unity | 5 ----- .../Assets/Scenes/306_GlobalIlluminationDenoised2.unity | 5 +++++ .../Assets/Scenes/307_GlobalIlluminationFog.unity | 4 ++-- .../Assets/Scenes/711_DirectionalShadowFallback.unity | 5 ----- TestProjects/HDRP_DXR_Tests/Packages/manifest.json | 4 +++- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/1000_RaytracingQualityKeyword_MaterialQuality_Indirect.unity b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/1000_RaytracingQualityKeyword_MaterialQuality_Indirect.unity index a3e7eab2766..9a073db406b 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/1000_RaytracingQualityKeyword_MaterialQuality_Indirect.unity +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/1000_RaytracingQualityKeyword_MaterialQuality_Indirect.unity @@ -1262,11 +1262,6 @@ PrefabInstance: propertyPath: ImageComparisonSettings.UseBackBuffer 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!1 &1483252417 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/306_GlobalIlluminationDenoised2.unity b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/306_GlobalIlluminationDenoised2.unity index fbf11968004..9856ce3e208 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/306_GlobalIlluminationDenoised2.unity +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/306_GlobalIlluminationDenoised2.unity @@ -381,6 +381,11 @@ PrefabInstance: propertyPath: ImageComparisonSettings.TargetHeight value: 480 objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: xrThresholdMultiplier + value: 1.5 + objectReference: {fileID: 0} - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} propertyPath: waitFrames diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/307_GlobalIlluminationFog.unity b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/307_GlobalIlluminationFog.unity index 562ee2616f0..1ae227a1a9b 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/307_GlobalIlluminationFog.unity +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/307_GlobalIlluminationFog.unity @@ -388,8 +388,8 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} - propertyPath: xrCompatible - value: 0 + propertyPath: xrThresholdMultiplier + value: 1.5 objectReference: {fileID: 0} - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/711_DirectionalShadowFallback.unity b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/711_DirectionalShadowFallback.unity index fe8deb3cc93..86057687936 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/711_DirectionalShadowFallback.unity +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/711_DirectionalShadowFallback.unity @@ -1032,11 +1032,6 @@ PrefabInstance: propertyPath: m_NormalizedViewPortRect.height value: 1 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: renderPipelineAsset diff --git a/TestProjects/HDRP_DXR_Tests/Packages/manifest.json b/TestProjects/HDRP_DXR_Tests/Packages/manifest.json index 459de5142a6..19007dfd571 100644 --- a/TestProjects/HDRP_DXR_Tests/Packages/manifest.json +++ b/TestProjects/HDRP_DXR_Tests/Packages/manifest.json @@ -17,6 +17,7 @@ "com.unity.test-framework.utp-reporter": "1.0.2-preview", "com.unity.testframework.graphics": "7.7.1-preview", "com.unity.testing.hdrp": "file:../../../com.unity.testing.hdrp", + "com.unity.testing.xr": "file:../../../com.unity.testing.xr", "com.unity.textmeshpro": "3.0.0-preview.1", "com.unity.timeline": "1.2.6", "com.unity.ugui": "1.0.0", @@ -57,6 +58,7 @@ "com.unity.render-pipelines.core", "com.unity.render-pipelines.high-definition", "com.unity.testframework.graphics", - "com.unity.testing.hdrp" + "com.unity.testing.hdrp", + "com.unity.testing.xr" ] } \ No newline at end of file From e1e71f292448a4862d14eea1cc4706685a00f363 Mon Sep 17 00:00:00 2001 From: Fabien Houlmann Date: Thu, 7 Jan 2021 12:36:08 -0500 Subject: [PATCH 06/12] add TestCaseFilters for HDRP_DXR_Tests to avoid running PathTracing scenes in XR --- .../Assets/Common/TestCaseFilters.asset | 105 ++++++++++++++++++ .../Assets/Common/TestCaseFilters.asset.meta | 8 ++ 2 files changed, 113 insertions(+) create mode 100644 TestProjects/HDRP_DXR_Tests/Assets/Common/TestCaseFilters.asset create mode 100644 TestProjects/HDRP_DXR_Tests/Assets/Common/TestCaseFilters.asset.meta diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Common/TestCaseFilters.asset b/TestProjects/HDRP_DXR_Tests/Assets/Common/TestCaseFilters.asset new file mode 100644 index 00000000000..9c972dc339e --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/Common/TestCaseFilters.asset @@ -0,0 +1,105 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f6aa9f32113aec4a8bded44c1febe5c, type: 3} + m_Name: TestCaseFilters + m_EditorClassIdentifier: + filters: + - FilteredScene: {fileID: 0} + FilteredScenes: + - {fileID: 102900000, guid: e94f1768c0fea4843a93cf691ba136fd, type: 3} + ColorSpace: -1 + BuildPlatform: -2 + GraphicsDevice: 4 + XrSdk: Mock HMD Loader + StereoModes: 0 + Reason: PathTracing is not working with XR + - FilteredScene: {fileID: 0} + FilteredScenes: + - {fileID: 102900000, guid: 3666dc8006745714997c368c4375f316, type: 3} + ColorSpace: -1 + BuildPlatform: -2 + GraphicsDevice: 4 + XrSdk: Mock HMD Loader + StereoModes: 0 + Reason: PathTracing is not working with XR + - FilteredScene: {fileID: 0} + FilteredScenes: + - {fileID: 102900000, guid: 0ab35aa39f371ab4c8d53b46c225d0a5, type: 3} + ColorSpace: -1 + BuildPlatform: -2 + GraphicsDevice: 4 + XrSdk: Mock HMD Loader + StereoModes: 0 + Reason: PathTracing is not working with XR + - FilteredScene: {fileID: 0} + FilteredScenes: + - {fileID: 102900000, guid: 1f55baf6eaf625e4fab7fa2e4228a3d0, type: 3} + ColorSpace: -1 + BuildPlatform: -2 + GraphicsDevice: 4 + XrSdk: Mock HMD Loader + StereoModes: 0 + Reason: PathTracing is not working with XR + - FilteredScene: {fileID: 0} + FilteredScenes: + - {fileID: 102900000, guid: 0bd00ddb543475c41bdd787c636d904f, type: 3} + ColorSpace: -1 + BuildPlatform: -2 + GraphicsDevice: 4 + XrSdk: Mock HMD Loader + StereoModes: 0 + Reason: PathTracing is not working with XR + - FilteredScene: {fileID: 0} + FilteredScenes: + - {fileID: 102900000, guid: 9f38d7cbc64ad534485db5107427e269, type: 3} + ColorSpace: -1 + BuildPlatform: -2 + GraphicsDevice: 4 + XrSdk: Mock HMD Loader + StereoModes: 0 + Reason: PathTracing is not working with XR + - FilteredScene: {fileID: 0} + FilteredScenes: + - {fileID: 102900000, guid: c163eeeb7af1c194590ab367fb84a376, type: 3} + ColorSpace: -1 + BuildPlatform: -2 + GraphicsDevice: 4 + XrSdk: Mock HMD Loader + StereoModes: 0 + Reason: PathTracing is not working with XR + - FilteredScene: {fileID: 0} + FilteredScenes: + - {fileID: 102900000, guid: 94394be5b934f2543b05529545e764f9, type: 3} + ColorSpace: -1 + BuildPlatform: -2 + GraphicsDevice: 4 + XrSdk: Mock HMD Loader + StereoModes: 0 + Reason: PathTracing is not working with XR + - FilteredScene: {fileID: 0} + FilteredScenes: + - {fileID: 102900000, guid: a8836a288e8e4ae49abdf5d23fedb3c8, type: 3} + ColorSpace: -1 + BuildPlatform: -2 + GraphicsDevice: 4 + XrSdk: Mock HMD Loader + StereoModes: 0 + Reason: PathTracing is not working with XR + - FilteredScene: {fileID: 0} + FilteredScenes: + - {fileID: 102900000, guid: 7c5e1446f931c184aaa07d7dd2f03616, type: 3} + ColorSpace: -1 + BuildPlatform: -2 + GraphicsDevice: 4 + XrSdk: Mock HMD Loader + StereoModes: 0 + Reason: PathTracing is not working with XR diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Common/TestCaseFilters.asset.meta b/TestProjects/HDRP_DXR_Tests/Assets/Common/TestCaseFilters.asset.meta new file mode 100644 index 00000000000..67586261225 --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/Common/TestCaseFilters.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c5b7cd4b0c3ee364fad6e7600add24e8 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: From 5fc5c0d4ceaa3a2899f7f593875c8c59a66fad2f Mon Sep 17 00:00:00 2001 From: Fabien Houlmann Date: Thu, 7 Jan 2021 13:47:48 -0500 Subject: [PATCH 07/12] update Yamato config --- .yamato/config/hdrp.metafile | 2 +- .yamato/config/hdrp_dxr.metafile | 2 +- .yamato/config/hdrp_hybrid.metafile | 2 +- .yamato/config/vfx_hdrp.metafile | 2 +- .yamato/hdrp-osx-metal.yml | 4 ++-- .yamato/hdrp-win-dx11.yml | 4 ++-- .yamato/hdrp-win-dx12.yml | 4 ++-- .yamato/hdrp-win-vulkan.yml | 4 ++-- .yamato/hdrp_dxr-win-dx12.yml | 4 ++-- .yamato/hdrp_hybrid-osx-metal.yml | 4 ++-- .yamato/hdrp_hybrid-win-dx11.yml | 4 ++-- .yamato/hdrp_hybrid-win-dx12.yml | 4 ++-- .yamato/hdrp_hybrid-win-vulkan.yml | 4 ++-- .yamato/vfx_hdrp-osx-metal.yml | 4 ++-- .yamato/vfx_hdrp-win-dx11.yml | 4 ++-- .yamato/vfx_hdrp-win-dx12.yml | 4 ++-- .yamato/vfx_hdrp-win-vulkan.yml | 4 ++-- 17 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.yamato/config/hdrp.metafile b/.yamato/config/hdrp.metafile index 4a1db0a2422..a2154977c73 100644 --- a/.yamato/config/hdrp.metafile +++ b/.yamato/config/hdrp.metafile @@ -7,7 +7,7 @@ test_platforms: - type: playmode name: playmode_XR utr_flags: - - [all]: --extra-editor-arg="-xr-tests" + - [all]: --extra-editor-arg="-xr-reuse-tests" - type: editmode - type: Standalone utr_flags: diff --git a/.yamato/config/hdrp_dxr.metafile b/.yamato/config/hdrp_dxr.metafile index 23e1284d9e7..d904b8c818d 100644 --- a/.yamato/config/hdrp_dxr.metafile +++ b/.yamato/config/hdrp_dxr.metafile @@ -7,7 +7,7 @@ test_platforms: - type: playmode name: playmode_XR utr_flags: - - [all]: --extra-editor-arg="-xr-tests" + - [all]: --extra-editor-arg="-xr-reuse-tests" expression_trigger: expression: "" platforms: diff --git a/.yamato/config/hdrp_hybrid.metafile b/.yamato/config/hdrp_hybrid.metafile index d12fe068b23..7f8aa79709c 100644 --- a/.yamato/config/hdrp_hybrid.metafile +++ b/.yamato/config/hdrp_hybrid.metafile @@ -8,7 +8,7 @@ test_platforms: - type: playmode name: playmode_XR utr_flags: - - [all]: --extra-editor-arg="-xr-tests" + - [all]: --extra-editor-arg="-xr-reuse-tests" - [all]: --compilation-errors-as-warnings # - type: editmode # utr_flags: diff --git a/.yamato/config/vfx_hdrp.metafile b/.yamato/config/vfx_hdrp.metafile index d6125aa49d6..cfa925851be 100644 --- a/.yamato/config/vfx_hdrp.metafile +++ b/.yamato/config/vfx_hdrp.metafile @@ -9,7 +9,7 @@ test_platforms: - type: playmode name: playmode_XR utr_flags: - - [all]: --extra-editor-arg="-xr-tests" + - [all]: --extra-editor-arg="-xr-reuse-tests" - type: editmode expression_trigger: expression: 'pull_request.target eq "master" AND NOT pull_request.draft AND pull_request.changes.any match ["com.unity.visualeffectgraph/**/*", "TestProjects/VisualEffectGraph_HDRP/**/*"]' diff --git a/.yamato/hdrp-osx-metal.yml b/.yamato/hdrp-osx-metal.yml index 0bc34afaad0..af41cab7454 100644 --- a/.yamato/hdrp-osx-metal.yml +++ b/.yamato/hdrp-osx-metal.yml @@ -55,7 +55,7 @@ HDRP_OSX_Metal_playmode_XR_mono_Linear_trunk: - ssh -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" bokken@$BOKKEN_DEVICE_IP '$(python3 -m site --user-base)/bin/unity-downloader-cli -u {{editor_versions.trunk_latest_internal.macos.revision}} -c editor -c il2cpp --wait --published-only' - |5- - ssh -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" bokken@$BOKKEN_DEVICE_IP "export UPM_REGISTRY=https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates; echo \$UPM_REGISTRY; cd ~/Graphics/TestProjects/HDRP_Tests && ~/Graphics/TestProjects/HDRP_Tests/utr --artifacts_path=/Users/bokken/Graphics/TestProjects/HDRP_Tests/test-results --editor-location=/Users/bokken/.Editor --extra-editor-arg="-colorspace=Linear" --extra-editor-arg="-xr-tests" --reruncount=2 --scripting-backend=Mono2x --suite=playmode --testfilter=$TEST_FILTER --testproject=/Users/bokken/Graphics/TestProjects/HDRP_Tests --zero-tests-are-ok=1" + ssh -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" bokken@$BOKKEN_DEVICE_IP "export UPM_REGISTRY=https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates; echo \$UPM_REGISTRY; cd ~/Graphics/TestProjects/HDRP_Tests && ~/Graphics/TestProjects/HDRP_Tests/utr --artifacts_path=/Users/bokken/Graphics/TestProjects/HDRP_Tests/test-results --editor-location=/Users/bokken/.Editor --extra-editor-arg="-colorspace=Linear" --extra-editor-arg="-xr-reuse-tests" --reruncount=2 --scripting-backend=Mono2x --suite=playmode --testfilter=$TEST_FILTER --testproject=/Users/bokken/Graphics/TestProjects/HDRP_Tests --zero-tests-are-ok=1" UTR_RESULT=$? mkdir -p TestProjects/HDRP_Tests/test-results/ scp -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" -r bokken@$BOKKEN_DEVICE_IP:/Users/bokken/Graphics/TestProjects/HDRP_Tests/test-results/ TestProjects/HDRP_Tests/test-results/ @@ -147,7 +147,7 @@ HDRP_OSX_Metal_playmode_XR_mono_Linear_CUSTOM-REVISION: - ssh -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" bokken@$BOKKEN_DEVICE_IP '$(python3 -m site --user-base)/bin/unity-downloader-cli --source-file ~/Graphics/unity_revision.txt -c editor -c il2cpp --wait --published-only' - |5- - ssh -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" bokken@$BOKKEN_DEVICE_IP "export UPM_REGISTRY=https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates; echo \$UPM_REGISTRY; cd ~/Graphics/TestProjects/HDRP_Tests && ~/Graphics/TestProjects/HDRP_Tests/utr --artifacts_path=/Users/bokken/Graphics/TestProjects/HDRP_Tests/test-results --editor-location=/Users/bokken/.Editor --extra-editor-arg="-colorspace=Linear" --extra-editor-arg="-xr-tests" --reruncount=2 --scripting-backend=Mono2x --suite=playmode --testfilter=$TEST_FILTER --testproject=/Users/bokken/Graphics/TestProjects/HDRP_Tests --zero-tests-are-ok=1" + ssh -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" bokken@$BOKKEN_DEVICE_IP "export UPM_REGISTRY=https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates; echo \$UPM_REGISTRY; cd ~/Graphics/TestProjects/HDRP_Tests && ~/Graphics/TestProjects/HDRP_Tests/utr --artifacts_path=/Users/bokken/Graphics/TestProjects/HDRP_Tests/test-results --editor-location=/Users/bokken/.Editor --extra-editor-arg="-colorspace=Linear" --extra-editor-arg="-xr-reuse-tests" --reruncount=2 --scripting-backend=Mono2x --suite=playmode --testfilter=$TEST_FILTER --testproject=/Users/bokken/Graphics/TestProjects/HDRP_Tests --zero-tests-are-ok=1" UTR_RESULT=$? mkdir -p TestProjects/HDRP_Tests/test-results/ scp -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" -r bokken@$BOKKEN_DEVICE_IP:/Users/bokken/Graphics/TestProjects/HDRP_Tests/test-results/ TestProjects/HDRP_Tests/test-results/ diff --git a/.yamato/hdrp-win-dx11.yml b/.yamato/hdrp-win-dx11.yml index a8b99fd044e..891ca92d56f 100644 --- a/.yamato/hdrp-win-dx11.yml +++ b/.yamato/hdrp-win-dx11.yml @@ -55,7 +55,7 @@ HDRP_Win_DX11_playmode_XR_mono_Linear_trunk: set /p GIT_REVISIONDATE= Date: Thu, 7 Jan 2021 15:10:18 -0500 Subject: [PATCH 08/12] update HDRP_HybridTests for MockHMD --- .../SampleScenes/TestMBPCompatibility.unity | 2 +- .../SampleScenes/TestShaderGraphOverrides.unity | 2 +- .../Assets/Tests/Editor/SetupGraphicsTestCases.cs | 3 +++ .../Assets/Tests/Editor/TestEditor.asmdef | 1 + .../Assets/Tests/Runtime/GraphicsTests.cs | 15 +++++++++++---- .../Assets/Tests/Runtime/TestRuntime.asmdef | 2 ++ .../HDRP_HybridTests/Packages/manifest.json | 2 ++ 7 files changed, 21 insertions(+), 6 deletions(-) diff --git a/TestProjects/HDRP_HybridTests/Assets/SampleScenes/TestMBPCompatibility.unity b/TestProjects/HDRP_HybridTests/Assets/SampleScenes/TestMBPCompatibility.unity index 26cb4ed7755..41029918cad 100644 --- a/TestProjects/HDRP_HybridTests/Assets/SampleScenes/TestMBPCompatibility.unity +++ b/TestProjects/HDRP_HybridTests/Assets/SampleScenes/TestMBPCompatibility.unity @@ -388,7 +388,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 72a52dfe574e74241ab397426ebce340, type: 3} m_Name: m_EditorClassIdentifier: - m_Enable: 1 + m_Enable: 0 --- !u!4 &739381599 Transform: m_ObjectHideFlags: 0 diff --git a/TestProjects/HDRP_HybridTests/Assets/SampleScenes/TestShaderGraphOverrides.unity b/TestProjects/HDRP_HybridTests/Assets/SampleScenes/TestShaderGraphOverrides.unity index af25156a0d4..8d393a1e772 100644 --- a/TestProjects/HDRP_HybridTests/Assets/SampleScenes/TestShaderGraphOverrides.unity +++ b/TestProjects/HDRP_HybridTests/Assets/SampleScenes/TestShaderGraphOverrides.unity @@ -577,7 +577,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 72a52dfe574e74241ab397426ebce340, type: 3} m_Name: m_EditorClassIdentifier: - m_Enable: 1 + m_Enable: 0 --- !u!4 &739381599 Transform: m_ObjectHideFlags: 0 diff --git a/TestProjects/HDRP_HybridTests/Assets/Tests/Editor/SetupGraphicsTestCases.cs b/TestProjects/HDRP_HybridTests/Assets/Tests/Editor/SetupGraphicsTestCases.cs index b4043c47914..41c3af5b667 100644 --- a/TestProjects/HDRP_HybridTests/Assets/Tests/Editor/SetupGraphicsTestCases.cs +++ b/TestProjects/HDRP_HybridTests/Assets/Tests/Editor/SetupGraphicsTestCases.cs @@ -16,6 +16,9 @@ public void Setup() // Once that's fixed, this class can be deleted and the SetupGraphicsTestCases class in Unity.TestFramework.Graphics.Editor // can be used directly instead. UnityEditor.TestTools.Graphics.SetupGraphicsTestCases.Setup("Assets/ReferenceImages"); + + // Configure project for XR tests + Unity.Testing.XR.Editor.InjectMockHMD.SetupLoader(); } private static void Log(string t) diff --git a/TestProjects/HDRP_HybridTests/Assets/Tests/Editor/TestEditor.asmdef b/TestProjects/HDRP_HybridTests/Assets/Tests/Editor/TestEditor.asmdef index 2fd6bf7805f..50dbe299351 100644 --- a/TestProjects/HDRP_HybridTests/Assets/Tests/Editor/TestEditor.asmdef +++ b/TestProjects/HDRP_HybridTests/Assets/Tests/Editor/TestEditor.asmdef @@ -4,6 +4,7 @@ "GUID:0acc523941302664db1f4e527237feb3", "GUID:27619889b8ba8c24980f49ee34dbb44a", "GUID:e18141520846dcc44b725b2f74e91229", + "GUID:925cf1d7b1444c3448cc9b44ce814a9e", "GUID:734d92eba21c94caba915361bd5ac177", "GUID:457756d89b35d2941b3e7b37b4ece6f1", "GUID:363a3288c06c1c14cbbeedbda31215f9" diff --git a/TestProjects/HDRP_HybridTests/Assets/Tests/Runtime/GraphicsTests.cs b/TestProjects/HDRP_HybridTests/Assets/Tests/Runtime/GraphicsTests.cs index 6705a067e7d..beeae38b9db 100644 --- a/TestProjects/HDRP_HybridTests/Assets/Tests/Runtime/GraphicsTests.cs +++ b/TestProjects/HDRP_HybridTests/Assets/Tests/Runtime/GraphicsTests.cs @@ -5,8 +5,8 @@ using System.Linq; using NUnit.Framework; using UnityEngine; +using UnityEngine.Rendering; using UnityEngine.TestTools; -//using UnityEngine.XR; using UnityEngine.TestTools.Graphics; using UnityEngine.SceneManagement; using Unity.Entities; @@ -40,15 +40,22 @@ public IEnumerator Run(GraphicsTestCase testCase) GameObject[] camObjects = GameObject.FindGameObjectsWithTag("MainCamera"); var cameras = camObjects.Select(x=>x.GetComponent()); + int waitFrames = settings.WaitFrames; + + if (XRGraphicsAutomatedTests.enabled) + { + waitFrames = Unity.Testing.XR.Runtime.ConfigureMockHMD.SetupTest(true, waitFrames, settings.ImageComparisonSettings); + } + // WaitFrames according to settings - for (int i = 0; i < settings.WaitFrames; i++) - yield return null; + for (int i = 0; i < waitFrames; i++) + yield return new WaitForEndOfFrame(); // Test Assert ImageAssert.AreEqual(testCase.ReferenceImage, cameras.Where(x => x != null), settings.ImageComparisonSettings); // Always wait one frame for scene load - yield return null; + yield return new WaitForEndOfFrame(); } diff --git a/TestProjects/HDRP_HybridTests/Assets/Tests/Runtime/TestRuntime.asmdef b/TestProjects/HDRP_HybridTests/Assets/Tests/Runtime/TestRuntime.asmdef index 4ced46acd78..bb0827ab299 100644 --- a/TestProjects/HDRP_HybridTests/Assets/Tests/Runtime/TestRuntime.asmdef +++ b/TestProjects/HDRP_HybridTests/Assets/Tests/Runtime/TestRuntime.asmdef @@ -1,8 +1,10 @@ { "name": "TestRuntime", "references": [ + "GUID:df380645f10b7bc4b97d4f5eb6303d95", "GUID:c081bc530f560634bb5c21d4b323a7f1", "GUID:27619889b8ba8c24980f49ee34dbb44a", + "GUID:1d4ad4ead25f33942b7dcf63e8c0820b", "GUID:0acc523941302664db1f4e527237feb3", "GUID:734d92eba21c94caba915361bd5ac177", "GUID:d8b63aba1907145bea998dd612889d6b", diff --git a/TestProjects/HDRP_HybridTests/Packages/manifest.json b/TestProjects/HDRP_HybridTests/Packages/manifest.json index ffa899b67ec..74faf3ce9c2 100644 --- a/TestProjects/HDRP_HybridTests/Packages/manifest.json +++ b/TestProjects/HDRP_HybridTests/Packages/manifest.json @@ -20,6 +20,7 @@ "com.unity.test-framework.build": "0.0.1-preview.12", "com.unity.test-framework.utp-reporter": "0.2.3-preview", "com.unity.testframework.graphics": "7.7.1-preview", + "com.unity.testing.xr": "file:../../../com.unity.testing.xr", "com.unity.textmeshpro": "3.0.0-preview.1", "com.unity.timeline": "1.3.0-preview.2", "com.unity.ugui": "1.0.0", @@ -58,6 +59,7 @@ }, "testables": [ "com.unity.testframework.graphics", + "com.unity.testing.xr", "com.unity.rendering.hybrid" ], "useSatSolver": true, From 4ee45a3a10b958153cba2c003535b76fb2b439cb Mon Sep 17 00:00:00 2001 From: Fabien Houlmann Date: Thu, 7 Jan 2021 15:12:04 -0500 Subject: [PATCH 09/12] disable 8107 for XR until it's fixed with waitFrames + useBackbuffer --- ...107_UnlitShadowMatteAmbientOcclusion.unity | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/8x_ShaderGraph/8107_UnlitShadowMatteAmbientOcclusion.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/8x_ShaderGraph/8107_UnlitShadowMatteAmbientOcclusion.unity index 668f080032c..0a3626ad9d6 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/8x_ShaderGraph/8107_UnlitShadowMatteAmbientOcclusion.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/8x_ShaderGraph/8107_UnlitShadowMatteAmbientOcclusion.unity @@ -725,23 +725,8 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} - propertyPath: waitFrames - value: 10 - objectReference: {fileID: 0} - - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, - type: 3} - propertyPath: xrThresholdMultiplier - value: 1.5 - objectReference: {fileID: 0} - - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, - type: 3} - propertyPath: ImageComparisonSettings.UseBackBuffer - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, - type: 3} - propertyPath: ImageComparisonSettings.ImageResolution - value: 4 + propertyPath: xrCompatible + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} From b98365bdda4d2ec489880a90a2fb7a422a883c66 Mon Sep 17 00:00:00 2001 From: Fabien Houlmann Date: Thu, 7 Jan 2021 17:17:44 -0500 Subject: [PATCH 10/12] fix DXR tests with XR --- .../Assets/Common/TestCaseFilters.asset | 105 ------------------ .../Assets/Common/TestCaseFilters.asset.meta | 8 -- .../HDRenderPipeline.RenderGraph.cs | 9 +- .../RenderPipeline/PathTracing/PathTracing.cs | 6 - 4 files changed, 8 insertions(+), 120 deletions(-) delete mode 100644 TestProjects/HDRP_DXR_Tests/Assets/Common/TestCaseFilters.asset delete mode 100644 TestProjects/HDRP_DXR_Tests/Assets/Common/TestCaseFilters.asset.meta diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Common/TestCaseFilters.asset b/TestProjects/HDRP_DXR_Tests/Assets/Common/TestCaseFilters.asset deleted file mode 100644 index 9c972dc339e..00000000000 --- a/TestProjects/HDRP_DXR_Tests/Assets/Common/TestCaseFilters.asset +++ /dev/null @@ -1,105 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f6aa9f32113aec4a8bded44c1febe5c, type: 3} - m_Name: TestCaseFilters - m_EditorClassIdentifier: - filters: - - FilteredScene: {fileID: 0} - FilteredScenes: - - {fileID: 102900000, guid: e94f1768c0fea4843a93cf691ba136fd, type: 3} - ColorSpace: -1 - BuildPlatform: -2 - GraphicsDevice: 4 - XrSdk: Mock HMD Loader - StereoModes: 0 - Reason: PathTracing is not working with XR - - FilteredScene: {fileID: 0} - FilteredScenes: - - {fileID: 102900000, guid: 3666dc8006745714997c368c4375f316, type: 3} - ColorSpace: -1 - BuildPlatform: -2 - GraphicsDevice: 4 - XrSdk: Mock HMD Loader - StereoModes: 0 - Reason: PathTracing is not working with XR - - FilteredScene: {fileID: 0} - FilteredScenes: - - {fileID: 102900000, guid: 0ab35aa39f371ab4c8d53b46c225d0a5, type: 3} - ColorSpace: -1 - BuildPlatform: -2 - GraphicsDevice: 4 - XrSdk: Mock HMD Loader - StereoModes: 0 - Reason: PathTracing is not working with XR - - FilteredScene: {fileID: 0} - FilteredScenes: - - {fileID: 102900000, guid: 1f55baf6eaf625e4fab7fa2e4228a3d0, type: 3} - ColorSpace: -1 - BuildPlatform: -2 - GraphicsDevice: 4 - XrSdk: Mock HMD Loader - StereoModes: 0 - Reason: PathTracing is not working with XR - - FilteredScene: {fileID: 0} - FilteredScenes: - - {fileID: 102900000, guid: 0bd00ddb543475c41bdd787c636d904f, type: 3} - ColorSpace: -1 - BuildPlatform: -2 - GraphicsDevice: 4 - XrSdk: Mock HMD Loader - StereoModes: 0 - Reason: PathTracing is not working with XR - - FilteredScene: {fileID: 0} - FilteredScenes: - - {fileID: 102900000, guid: 9f38d7cbc64ad534485db5107427e269, type: 3} - ColorSpace: -1 - BuildPlatform: -2 - GraphicsDevice: 4 - XrSdk: Mock HMD Loader - StereoModes: 0 - Reason: PathTracing is not working with XR - - FilteredScene: {fileID: 0} - FilteredScenes: - - {fileID: 102900000, guid: c163eeeb7af1c194590ab367fb84a376, type: 3} - ColorSpace: -1 - BuildPlatform: -2 - GraphicsDevice: 4 - XrSdk: Mock HMD Loader - StereoModes: 0 - Reason: PathTracing is not working with XR - - FilteredScene: {fileID: 0} - FilteredScenes: - - {fileID: 102900000, guid: 94394be5b934f2543b05529545e764f9, type: 3} - ColorSpace: -1 - BuildPlatform: -2 - GraphicsDevice: 4 - XrSdk: Mock HMD Loader - StereoModes: 0 - Reason: PathTracing is not working with XR - - FilteredScene: {fileID: 0} - FilteredScenes: - - {fileID: 102900000, guid: a8836a288e8e4ae49abdf5d23fedb3c8, type: 3} - ColorSpace: -1 - BuildPlatform: -2 - GraphicsDevice: 4 - XrSdk: Mock HMD Loader - StereoModes: 0 - Reason: PathTracing is not working with XR - - FilteredScene: {fileID: 0} - FilteredScenes: - - {fileID: 102900000, guid: 7c5e1446f931c184aaa07d7dd2f03616, type: 3} - ColorSpace: -1 - BuildPlatform: -2 - GraphicsDevice: 4 - XrSdk: Mock HMD Loader - StereoModes: 0 - Reason: PathTracing is not working with XR diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Common/TestCaseFilters.asset.meta b/TestProjects/HDRP_DXR_Tests/Assets/Common/TestCaseFilters.asset.meta deleted file mode 100644 index 67586261225..00000000000 --- a/TestProjects/HDRP_DXR_Tests/Assets/Common/TestCaseFilters.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c5b7cd4b0c3ee364fad6e7600add24e8 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs index 6aa6c8770f5..380c5e657cc 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs @@ -91,7 +91,14 @@ void ExecuteWithRenderGraph(RenderRequest renderRequest, // lightCluster.EvaluateClusterDebugView(cmd, hdCamera); //} - colorBuffer = RenderPathTracing(m_RenderGraph, hdCamera); + if (hdCamera.viewCount == 1) + { + colorBuffer = RenderPathTracing(m_RenderGraph, hdCamera); + } + else + { + Debug.LogWarning("Path Tracing is not supported with XR single-pass rendering."); + } } else { diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/PathTracing.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/PathTracing.cs index 03710ddf95e..f91dc01b4e4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/PathTracing.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/PathTracing.cs @@ -334,12 +334,6 @@ TextureHandle RenderPathTracing(RenderGraph renderGraph, HDCamera hdCamera) if (!pathTracingShader || !m_PathTracingSettings.enable.value) return TextureHandle.nullHandle; - if (hdCamera.viewCount > 1) - { - Debug.LogError("Path Tracing is not supported when using XR single-pass rendering."); - return TextureHandle.nullHandle; - } - CheckDirtiness(hdCamera); var parameters = PreparePathTracingParameters(hdCamera); From 241ffa5e5e6fb3e3fce3abbcbadb2090bd01226a Mon Sep 17 00:00:00 2001 From: Fabien Houlmann Date: Fri, 8 Jan 2021 11:20:14 -0500 Subject: [PATCH 11/12] tweak XR threshold for tests 1102, 1103, 1710 --- .../Scenes/1x_Materials/1102_Unlit_Distortion.unity | 2 +- .../1x_Materials/1103_Unlit_Distortion_DepthTest.unity | 5 +++++ .../Scenes/1x_Materials/1710_Decals_Normal_Patch.unity | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1102_Unlit_Distortion.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1102_Unlit_Distortion.unity index c83994cd467..40068ad4943 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1102_Unlit_Distortion.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1102_Unlit_Distortion.unity @@ -41227,7 +41227,7 @@ PrefabInstance: - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} propertyPath: xrThresholdMultiplier - value: 1.2 + value: 1.5 objectReference: {fileID: 0} - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1103_Unlit_Distortion_DepthTest.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1103_Unlit_Distortion_DepthTest.unity index e8169064c3a..ad8eeec5d1c 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1103_Unlit_Distortion_DepthTest.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1103_Unlit_Distortion_DepthTest.unity @@ -38403,6 +38403,11 @@ PrefabInstance: propertyPath: m_RenderingPathCustomFrameSettings.bitDatas.data1 value: 70005818916701 objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: xrThresholdMultiplier + value: 1.5 + objectReference: {fileID: 0} - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} propertyPath: ImageComparisonSettings.TargetWidth diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1710_Decals_Normal_Patch.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1710_Decals_Normal_Patch.unity index 288310cd3ea..427bb830125 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1710_Decals_Normal_Patch.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1710_Decals_Normal_Patch.unity @@ -2102,7 +2102,7 @@ PrefabInstance: - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} propertyPath: xrThresholdMultiplier - value: 2 + value: 3 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} From 5ce12e4f28dbee07bae5c718b0d9021c4de5d5dd Mon Sep 17 00:00:00 2001 From: Fabien Houlmann Date: Fri, 8 Jan 2021 16:13:57 -0500 Subject: [PATCH 12/12] add missing code to XR HDRP_HybridTests --- .../HDRP_HybridTests/Assets/Tests/Runtime/GraphicsTests.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TestProjects/HDRP_HybridTests/Assets/Tests/Runtime/GraphicsTests.cs b/TestProjects/HDRP_HybridTests/Assets/Tests/Runtime/GraphicsTests.cs index beeae38b9db..fc758e44c05 100644 --- a/TestProjects/HDRP_HybridTests/Assets/Tests/Runtime/GraphicsTests.cs +++ b/TestProjects/HDRP_HybridTests/Assets/Tests/Runtime/GraphicsTests.cs @@ -67,6 +67,8 @@ public void DumpImagesInEditor() #endif CleanUp(); + + XRGraphicsAutomatedTests.running = false; } public void CleanUp()