From a123bd7298d0b18879455faa5daaf1a53b32dc8a Mon Sep 17 00:00:00 2001 From: Adrien de Tocqueville Date: Wed, 16 Dec 2020 15:03:18 +0100 Subject: [PATCH 1/2] Move EndCameraRendering callback out of the profiling scope --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/RenderPipeline/HDRenderPipeline.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 4e4d7488671..171b2c88428 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed NullPointerException when baking probes from the lighting window (case 1289680) - Fixed volumetric fog with XR single-pass rendering. - Fixed issues with first frame rendering when RenderGraph is used (auto exposure, AO) +- Fixed issue when submitting SRPContext during EndCameraRendering. ### Changed - Removed the material pass probe volumes evaluation mode. 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 068f606b1e2..e88a2fbc9d8 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -1902,9 +1902,10 @@ ref _cullingResults cmd.SetInvertCulling(renderRequest.cameraSettings.invertFaceCulling); ExecuteRenderRequest(renderRequest, renderContext, cmd, AOVRequestData.defaultAOVRequestDataNonAlloc); cmd.SetInvertCulling(false); - UnityEngine.Rendering.RenderPipeline.EndCameraRendering(renderContext, renderRequest.hdCamera.camera); } + EndCameraRendering(renderContext, renderRequest.hdCamera.camera); + { var target = renderRequest.target; // Handle the copy if requested From a21d620701d6e77d0674313f368893f2f8282b51 Mon Sep 17 00:00:00 2001 From: Adrien de Tocqueville Date: Wed, 16 Dec 2020 18:48:54 +0100 Subject: [PATCH 2/2] added a comment --- .../Runtime/RenderPipeline/HDRenderPipeline.cs | 1 + 1 file changed, 1 insertion(+) 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 e88a2fbc9d8..a23f71050c9 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -1904,6 +1904,7 @@ ref _cullingResults cmd.SetInvertCulling(false); } + // EndCameraRendering callback should be executed outside of any profiling scope in case user code submits the renderContext EndCameraRendering(renderContext, renderRequest.hdCamera.camera); {