compute shader: waiting for a cs completetion, error with multiple kernels

Do you have to wait for a dispatched compute buffer to be complete before you can read the RWbuffer?

Why is this code returning an error in the console?

    public ComputeShader cs;
        int kernelMain, kernelSwapBuffer;

    void OnEnable()
    {
        kernelMain = cs.FindKernel("CSMain");
        kernelSwapBuffer = cs.FindKernel("SwapBuffer");

#pragma kernel CSMain
#pragma kernel SwapBuffer

RWStructuredBuffer<float> output;
StructuredBuffer<float> buffer;

int width;
int height;
StructuredBuffer<float> emitters;
StructuredBuffer<float> obstacles;

[numthreads(8,8,1)]
void CSMain (uint2 id : SV_DispatchThreadID)
{
    int em = emitters[id.x + width * id.y];
    float p = em
        + buffer[id.x + 1 + width * id.y]
        + buffer[id.x - 1 + width * id.y]
        + buffer[id.x + width * (id.y + 1)]
        + buffer[id.x + width * (id.y - 1)]
        ;

    output[id.x] = p * obstacles[id.x + width * id.y];
}

[numthreads(64,1,1)]
void SwapBuffer (uint2 id : SV_DispatchThreadID)
{
    buffer[id.x] = output[id.x];
}

Select your shader file in Unity and check what errors it will show in the object inspector section. By some reason those errors don’t show in the main debug section as they used to and as C# errors do. And they don’t block the project from being runned, you just get those “kernel not found” errors.

Got it, thanks Zolden
I logged a bug on this because I agree that these should be in the console.