DrawProcedural from Compute Shader only updates when Unity is paused/unpaused

I’m using a Compute Shader to create a bunch of positions, and then using Graphics.DrawProcedural to render them to the camera. And it works! …once. It only uses data from the Compute Shader once, and after that it only gets updated data if I pause and unpause the Editor. Anyone know what’s up? It’s kinda like the material getting the SetBuffer doesn’t think it needs updating.

I tried changing it to a CommandBuffer.DrawProcedural, but that didn’t help.

    public void Start ()
    {
        pointCloudBuffer_ = new ComputeBuffer(131072, 12, ComputeBufferType.Append);
        pointCloudBuffer_.SetCounterValue (0);

        material.SetBuffer ("_PointCloudBuffer", pointCloudBuffer_);
        shader.SetBuffer(kernelHandle_, "_PointCloudBuffer", pointCloudBuffer_);

        commandBuf = new CommandBuffer ();
        commandBuf.name = "PointCloud";
        commandBuf.DrawProcedural(camera.cameraToWorldMatrix, material, -1, MeshTopology.Points, 131072);
        camera.AddCommandBuffer(CameraEvent.AfterFinalPass, commandBuf);
     }

In the Compute Shader, I’m using
AppendStructuredBuffer _PointCloudBuffer;

and in the fragment shader, I’m using
StructuredBuffer _PointCloudBuffer;

Clarification: from more testing, the shader updates from the structured buffer every time the camera is disabled, then enabled. But not if we constantly toggle the camera on and off every update.

Here’s my regular shader, that isn’t getting (or using maybe) an updated buffer, see anything off about it that could cause this?

        Cull Back ZWrite Off ZTest Lequal

        Pass
        {
            CGPROGRAM
            #pragma target 5.0
            #pragma vertex vert
            #pragma fragment frag

 
            #include "UnityCG.cginc"
            //The buffer containing the points we want to draw.
            StructuredBuffer<float3> _PointCloudBuffer;
            struct ps_input {
                float4 pos : SV_POSITION;
            };
            ps_input vert (uint id : SV_VertexID)
            {
                ps_input o;
                float3 worldPos = _PointCloudBuffer[id];                // Read the world position of this point
                o.pos = mul (UNITY_MATRIX_VP, float4(worldPos,1.0f));    // Convert it to View Position
                return o;
            }
            float4 frag (ps_input i) : COLOR
            {
                return float4(1,0,0,1);            // highlight the pixel in red
            }
            ENDCG
        }

I figured out what was causing the problem - I’m using the Depth Texture for the camera in my ComputeShader. But the Depth Texture won’t have any data if the camera is culling everything. But I wanted the camera to show black except for the procedural mesh I was generating, so I culled everything, so it didn’t update…except briefly when other cameras rendered something.