Depth of Field throwing multiple errors

Hi,

I’m on 2021.1.28f1, HDRP 11.0.0, and want to use Depth of Field on a global volume. I get the following three errors book-ended by “Error while building Render Graph.” and “Render Graph Execution error”, all repeating in that order:

ArgumentException: Trying to use an invalid resource (pass Depth of Field).

ArgumentException: Trying to use an invalid resource (pass Depth of Field).
UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraphBuilder.CheckResource (UnityEngine.Experimental.Rendering.RenderGraphModule.ResourceHandle& res) (at Library/PackageCache/com.unity.render-pipelines.core@11.0.0/Runtime/RenderGraph/RenderGraphBuilder.cs:276)
UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraphBuilder.ReadTexture (UnityEngine.Experimental.Rendering.RenderGraphModule.TextureHandle& input) (at Library/PackageCache/com.unity.render-pipelines.core@11.0.0/Runtime/RenderGraph/RenderGraphBuilder.cs:54)
UnityEngine.Rendering.HighDefinition.PostProcessSystem.DepthOfFieldPass (UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraph renderGraph, UnityEngine.Rendering.HighDefinition.HDCamera hdCamera, UnityEngine.Experimental.Rendering.RenderGraphModule.TextureHandle depthBuffer, UnityEngine.Experimental.Rendering.RenderGraphModule.TextureHandle motionVectors, UnityEngine.Experimental.Rendering.RenderGraphModule.TextureHandle depthBufferMipChain, UnityEngine.Experimental.Rendering.RenderGraphModule.TextureHandle source, UnityEngine.Experimental.Rendering.RenderGraphModule.TextureHandle depthMinMaxAvgMSAA) (at Library/PackageCache/com.unity.render-pipelines.high-definition@11.0.0/Runtime/PostProcessing/PostProcessSystem.RenderGraph.cs:461)
UnityEngine.Rendering.HighDefinition.PostProcessSystem.Render (UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraph renderGraph, UnityEngine.Rendering.HighDefinition.HDCamera hdCamera, UnityEngine.Rendering.HighDefinition.BlueNoise blueNoise, UnityEngine.Experimental.Rendering.RenderGraphModule.TextureHandle colorBuffer, UnityEngine.Experimental.Rendering.RenderGraphModule.TextureHandle afterPostProcessTexture, UnityEngine.Experimental.Rendering.RenderGraphModule.TextureHandle depthBuffer, UnityEngine.Experimental.Rendering.RenderGraphModule.TextureHandle depthBufferMipChain, UnityEngine.Experimental.Rendering.RenderGraphModule.TextureHandle normalBuffer, UnityEngine.Experimental.Rendering.RenderGraphModule.TextureHandle motionVectors, UnityEngine.Experimental.Rendering.RenderGraphModule.TextureHandle depthValuesMSAA, UnityEngine.Experimental.Rendering.RenderGraphModule.TextureHandle finalRT, System.Boolean flipY) (at Library/PackageCache/com.unity.render-pipelines.high-definition@11.0.0/Runtime/PostProcessing/PostProcessSystem.RenderGraph.cs:1050)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline.RenderPostProcess (UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraph renderGraph, UnityEngine.Rendering.HighDefinition.HDRenderPipeline+PrepassOutput prepassOutput, UnityEngine.Experimental.Rendering.RenderGraphModule.TextureHandle inputColor, UnityEngine.Experimental.Rendering.RenderGraphModule.TextureHandle backBuffer, UnityEngine.Rendering.CullingResults cullResults, UnityEngine.Rendering.HighDefinition.HDCamera hdCamera) (at Library/PackageCache/com.unity.render-pipelines.high-definition@11.0.0/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs:55)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline.ExecuteWithRenderGraph (UnityEngine.Rendering.HighDefinition.HDRenderPipeline+RenderRequest renderRequest, UnityEngine.Rendering.HighDefinition.AOVRequestData aovRequest, System.Collections.Generic.List1[T] aovBuffers, System.Collections.Generic.List1[T] aovCustomPassBuffers, UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Rendering.CommandBuffer commandBuffer) (at Library/PackageCache/com.unity.render-pipelines.high-definition@11.0.0/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs:281)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline.ExecuteRenderRequest (UnityEngine.Rendering.HighDefinition.HDRenderPipeline+RenderRequest renderRequest, UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.Rendering.HighDefinition.AOVRequestData aovRequest) (at Library/PackageCache/com.unity.render-pipelines.high-definition@11.0.0/Runtime/RenderPipeline/HDRenderPipeline.cs:2178)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)```NullReferenceException

[spoiler]

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.Rendering.CoreUtils.FixupDepthSlice (System.Int32 depthSlice, UnityEngine.Rendering.RTHandle buffer) (at Library/PackageCache/com.unity.render-pipelines.core@11.0.0/Runtime/Utilities/CoreUtils.cs:198)
UnityEngine.Rendering.CoreUtils.SetRenderTarget (UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.Rendering.RTHandle buffer, UnityEngine.Rendering.ClearFlag clearFlag, UnityEngine.Color clearColor, System.Int32 miplevel, UnityEngine.CubemapFace cubemapFace, System.Int32 depthSlice) (at Library/PackageCache/com.unity.render-pipelines.core@11.0.0/Runtime/Utilities/CoreUtils.cs:426)
UnityEngine.Rendering.CoreUtils.SetRenderTarget (UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.Rendering.RTHandle buffer, UnityEngine.Rendering.ClearFlag clearFlag, System.Int32 miplevel, UnityEngine.CubemapFace cubemapFace, System.Int32 depthSlice) (at Library/PackageCache/com.unity.render-pipelines.core@11.0.0/Runtime/Utilities/CoreUtils.cs:441)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline.RenderDepthPrepass (UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.Rendering.HighDefinition.FrameSettings frameSettings, UnityEngine.Rendering.RenderTargetIdentifier[ ] deferredMrt, UnityEngine.Rendering.RenderTargetIdentifier[ ] forwardMrt, UnityEngine.Rendering.RTHandle depthBuffer, UnityEngine.Experimental.Rendering.RendererList& depthDeferredRendererListDesc, UnityEngine.Experimental.Rendering.RendererList& depthForwardRendererListDesc, System.Boolean hasDepthDeferredPass) (at Library/PackageCache/com.unity.render-pipelines.high-definition@11.0.0/Runtime/RenderPipeline/HDRenderPipeline.cs:2816)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline+<>c.<RenderDepthPrepass>b__831_0 (UnityEngine.Rendering.HighDefinition.HDRenderPipeline+DepthPrepassData data, UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraphContext context) (at Library/PackageCache/com.unity.render-pipelines.high-definition@11.0.0/Runtime/RenderPipeline/HDRenderPipeline.Prepass.cs:392)
UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraphPass`1[PassData].Execute (UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraphContext renderGraphContext) (at Library/PackageCache/com.unity.render-pipelines.core@11.0.0/Runtime/RenderGraph/RenderGraphPass.cs:135)
UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraph.ExecuteCompiledPass (UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraph+CompiledPassInfo& passInfo, System.Int32 passIndex) (at Library/PackageCache/com.unity.render-pipelines.core@11.0.0/Runtime/RenderGraph/RenderGraph.cs:1154)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

[/spoiler]

Other effects on the same volume work fine, Depth of Field (mis-)behaves the same in a new scene with a new volume and profile without any other overrides.
I also tried opening a copy of the project in 2021.2.11f1, but there most MeshRenderers in the scene are fully transparent and the console has many errors, each empty without any text though.
How should I proceed to get DoF working?

Okay, what the heck, I wanted to see if I could get DoF to work in a fresh new HDRP Core template project. But every Unity version I tried (2021.1.28f1, 2021.2.11f and a fresh install of 2021.2.12f) doesn’t even open without the dialog about compilation errors and safe mode, and the errors filling the console are all empty, i.e. no text. How is this possible with fresh template projects in a fresh Unity install on a system that is capable of running HDRP content (as the original project works fine aside from DoF)?

Edit: figured out the problem with the empty errors: I uninstalled miniconda recently and that left a registry key that changes how cmd.exe is run.
I now have DoF working in new project, but not the old one, it seems to be broken somehow.