When a buffer resource was read, and after that read from another
shader stage it would not generate the appropriate pipeline barrier.
This is fixed by keeping the last write action around and check
if the shader stage was already included in the previous barriers.
Pull Request: https://projects.blender.org/blender/blender/pulls/123845