Fix profiling marker mismatches by removing named CommandBuffers. - #1250
Conversation
* Modified the default .Get() for CommandBufferPool to give an actually nameless CommandBuffer * Remove named CommandBuffers when also using ProfilingScopes.
There was a problem hiding this comment.
Do we not need to fix this in all the places where this is happening? For example:
ScreenSpaceAmbientOcclusion.Execute()PostProcessPass.Execute()SceneViewDepthCopy.Execute()TransparentSettingsPass.Execute()XROcclusionMeshPass.Execute()ScriptableRenderer.Execute()MainLightShadowCasterPass.RenderMainLightCascadeShadowmap()GBufferPass.Execute()FinalBlitPass.Execute()CopyDepthPass.Execute()CopyColorPass.Execute()ColorGradingLutPass.Execute()CapturePass.Execute()DeferredLights.ExecuteDeferredPass()DeferredLights.ExecuteDownsampleBitmaskPass()DeferredLights.ExecuteTileDepthInfoPass()Render2DLightingPass.Execute()OutputColorsToMRTsRenderPass.Execute()CopyToViewportRenderPass.Execute()CameraCallbackTests.Execute()ScreenSpaceShadowResolvePass.Execute()(Not used but still smart to fix it as well)
|
This change now removes all use of named command buffers from URP. |
| public static CommandBuffer Get() | ||
| { | ||
| var cmd = s_BufferPool.Get(); | ||
| cmd.name = "Unnamed Command Buffer"; |
There was a problem hiding this comment.
Should we leave this unchanged? I suppose this is to make default nameless command buffers appear on profiler?
@JulienIgnace-Unity any concern with changing?
There was a problem hiding this comment.
Yeah I think the goal was to have a marker by default. But since we now know that it can cause issues implicitly in some case it's probably better to have it unnamed by default.
There was a problem hiding this comment.
that ^, I guess for now this should suffice but probably in the future we can work together to find out what kind of construct would best suit both srps in terms of gathering profiling data :)
# Conflicts: # com.unity.render-pipelines.universal/CHANGELOG.md # com.unity.render-pipelines.universal/Runtime/DeferredLights.cs # com.unity.render-pipelines.universal/Runtime/ScriptableRenderer.cs
|
Merged master. I had to redo couple files, but change should be the same. |
Please read;
PR Workflow for the Graphics repository:
Checklist for PR maker
need-backport-*label. After you backport the PR, the label changes tobackported-*.CHANGELOG.mdfile.Purpose of this PR
Fix profiler marker error spam. Currently this only fixes the incorrect use cases. Minimal changes in that sense.
Backports:
[9.x.x.] #1329
Testing status
Manual Tests: What did you do?
Automated Tests: What did you setup? (Add a screenshot or the reference image of the test please)
Yamato: (Select your branch):
https://yamato.prd.cds.internal.unity3d.com/jobs/902-Graphics
Any test projects to go with this to help reviewers?
Comments to reviewers
Notes for the reviewers you have assigned.