GraphicsBuffer LockBufferForWrite

Hey everyone, I’ve been trying to figure out how to correctly use the graphics buffer LockBufferForWrite as well as UnlockBufferAfterWrite, I’ve been reading the documentation and I’m following everything it says to do, only calling each function one time per frame yet I’m getting the error

LockBufferForWrite: Multiple uploads in flight for buffer 0000022E24D608B8 (bufferHandle: 6372) of size 160016.
Falling back to slow path.
LockBufferForWrite() should not be called while a buffer has pending/active D3D11 commands - note that these commands can span multiple frames.
If you need to write to a buffer once per frame, consider utilizing double or triple buffering, cycling the target buffer each frame.

The QualitySettings.MaxQueuedFrames is set to 2, and I’ve tried using up to 6 buffers in my script in order to try and avoid that message to no avail

Here’s the code I’m using in order to write directly to the graphics buffer.
The JobHandle has Complete called on it after it returns it and before the PostManualUpdate is called. If anyone has any ideas I’d really appreciate some help since I’ve been stuck on this for a few days now.

private JobHandle CreateProceduralLineMeshThreaded()
 {

     GenerateVertices verts = new GenerateVertices();
     verts.points = points;
     verts.vertices = vertexBuffer[currentBuffer].LockBufferForWrite<float2>(0, (pointCount - 1) * 2);
     verts.halfThickness = thickness / 2f;
     verts.scale = new float2(transform.localScale.x, transform.localScale.y);
     JobHandle handle = verts.Schedule(pointCount - 1, 32);

     GenerateTriangles tris = new GenerateTriangles();
     tris.vertices = verts.vertices;
     tris.indices = trisBuffer[currentBuffer].LockBufferForWrite<int>(0, ((pointCount * 2) - 6) * 3);// pointCount * 6);
     JobHandle handleTwo = tris.Schedule((pointCount * 2) - 6, 16, handle);

     return handleTwo;

 }
public void PostManualUpdate()
    {

        Profiler.BeginSample("Set Mesh Data");

        vertexBuffer[currentBuffer].UnlockBufferAfterWrite<float2>((pointCount - 1) * 2);// (pointCount * 2);
        trisBuffer[currentBuffer].UnlockBufferAfterWrite<int>(((pointCount * 2) - 6) * 3);// (pointCount * 6);

        Profiler.EndSample();

        //Graphics.RenderMesh(in rParams, mesh, 0, Matrix4x4.TRS(transform.position, transform.rotation, transform.localScale));
        rp = new RenderParams(new Material(Shader.Find("Unlit/CustomUnlitLine")));
        rp.worldBounds = new Bounds(transform.position, new Vector3(100, 100, 25)); // use tighter bounds
        rp.shadowCastingMode = ShadowCastingMode.Off;
        rp.receiveShadows = false;

        rp.matProps = new MaterialPropertyBlock();
        rp.layer = gameObject.layer;

        rp.matProps.SetBuffer("Positions", vertexBuffer[currentBuffer]);
        rp.matProps.SetMatrix("ObjectToWorld", Matrix4x4.Translate(transform.position));
        rp.matProps.SetColor("lineColor", color);

        commandData[0].indexCountPerInstance = (uint)(((pointCount * 2) - 6) * 3);
        commandData[0].baseVertexIndex = 0;
        commandData[0].startIndex = 0;
        commandData[0].instanceCount = 1;
        commandBuf[currentBuffer].SetData(commandData);

        Graphics.RenderPrimitivesIndexedIndirect(in rp, MeshTopology.Triangles, trisBuffer[currentBuffer], commandBuf[currentBuffer]);

        currentBuffer++;

        if (currentBuffer >= bufferCount)
        {
            currentBuffer = 0;
        }

    }