All of the GPU commands sent to a VkQueue will start in order, but will not end in order. The GPU is free to schedule and reorganize the commands in whatever way it sees fit. This means that if we run a shader like above, and then try to do some rendering that uses said matrix buffer, it’s possible that the compute shader hasnt finished executing before the buffer is used, thus doing a data race and likely causing bad things to happen.
barrier also used in transition image layout and queue family ownership transfer
All of the GPU commands sent to a VkQueue will start in order, but will not end in order. The GPU is free to schedule and reorganize the commands in whatever way it sees fit. This means that if we run a shader like above, and then try to do some rendering that uses said matrix buffer, it’s possible that the compute shader hasnt finished executing before the buffer is used, thus doing a data race and likely causing bad things to happen.
barrier also used in transition image layout and queue family ownership transfer