Fix IOSurface synchronization issues

It appears that not only render targets, but also samplers that use
IOSurfaces require SwiftShader to perform synchronized draws,
otherwise it seems like using a shared IOSurface's CPU memory is
unsafe and can cause crashes in Layout Tests.

Bug chromium:846693

Change-Id: I0ce24700d34c657ac2447ceb2f6f837bfa3a9a58
Reviewed-on: https://swiftshader-review.googlesource.com/19288
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Renderer/PixelProcessor.cpp b/src/Renderer/PixelProcessor.cpp
index 7ae45e9..3903701 100644
--- a/src/Renderer/PixelProcessor.cpp
+++ b/src/Renderer/PixelProcessor.cpp
@@ -537,6 +537,15 @@
 		else ASSERT(false);
 	}
 
+	void PixelProcessor::setSyncRequired(unsigned int sampler, bool isSincRequired)
+	{
+		if(sampler < TEXTURE_IMAGE_UNITS)
+		{
+			context->sampler[sampler].setSyncRequired(isSincRequired);
+		}
+		else ASSERT(false);
+	}
+
 	void PixelProcessor::setWriteSRGB(bool sRGB)
 	{
 		context->setWriteSRGB(sRGB);