Reproduction steps:
1. Open the attached project “ReproProject“
2. Open scene “MainMenu“ in Assets/Scenes
3. Click on the Gizmos button in Game view and make it active
4. Observe the Console window
Expected result: No errors are logged
Actual result: Errors “RenderPass: Attachment 0 was created with 1 samples but 2 samples were requested.“, “BeginSubPass: Not inside a Renderpass“, “EndRenderPass: Not inside a Renderpass“ and “RenderPassContext: Found a rogue context, did you call EndRenderPass?“ are shown in the Console window
Reproducible with: 2021.3.32f1, 2022.3.13f1, 2023.2.0f1, 2023.3.0a14
Reproducible on: Windows 11
Not reproducible on: No other environment tested
Investigation notes
This only happens in compatibility mode (i.e. not using RenderGraph) and when using native render pass (unchecking this is a work-around).
The offending attachment is a depth buffer and turning off (by hacking the code) the copy depth buffer pass will make the problem go away.
Logic around MSAA changed in [Internal link] which landed in 2023.3.0b7. I have assigned this bug to [Internal link] for bisection.