Simple PipelineBarrier implementation

The simplest PipelineBarrier implementation is to call Renderer::synchronize().
This removes the synchronization mechanism from the draw commands, while still
allowing the tests to pass successfully.

Bug b/118619338

Change-Id: If7d9c14170db6f9a74a54c45a978d3ce78a1cdca
Reviewed-on: https://swiftshader-review.googlesource.com/c/25608
Tested-by: Alexis Hétu <sugoi@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
diff --git a/src/Vulkan/VkCommandBuffer.cpp b/src/Vulkan/VkCommandBuffer.cpp
index 50053be..90509bc 100644
--- a/src/Vulkan/VkCommandBuffer.cpp
+++ b/src/Vulkan/VkCommandBuffer.cpp
@@ -187,9 +187,6 @@
 			executionState.renderer->setInstanceID(instance);
 			executionState.renderer->draw(context.drawType, 0, primitiveCount);
 		}
-
-		// Wait for completion. We should be able to get rid of this eventually.
-		executionState.renderer->synchronize();
 	}
 
 	uint32_t vertexCount;
@@ -388,10 +385,10 @@
 
 	void play(CommandBuffer::ExecutionState& executionState) override
 	{
-		// This can currently be a noop. The sw::Surface locking/unlocking mechanism used by the renderer already takes care of
-		// making sure the read/writes always happen in order. Eventually, if we remove this synchronization mechanism, we can
-		// have a very simple implementation that simply calls sw::Renderer::sync(), since the driver is free to move the source
-		// stage towards the bottom of the pipe and the target stage towards the top, so a full pipeline sync is spec compliant.
+		// This is a very simple implementation that simply calls sw::Renderer::synchronize(),
+		// since the driver is free to move the source stage towards the bottom of the pipe
+		// and the target stage towards the top, so a full pipeline sync is spec compliant.
+		executionState.renderer->synchronize();
 
 		// Right now all buffers are read-only in drawcalls but a similar mechanism will be required once we support SSBOs.