glGetSynciv implementation

Added the missing part of the FenceSync object
implementation based on the assumption that all
fence operations are always signaled before
calling any sync related wait functions.

Passes all related dEQP tests.

Change-Id: I2fd2ac160dfd1250f55240fc3f696f00579d12d4
Reviewed-on: https://swiftshader-review.googlesource.com/8855
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/libGLESv2/libGLESv3.cpp b/src/OpenGL/libGLESv2/libGLESv3.cpp
index b91a451..bba2179 100644
--- a/src/OpenGL/libGLESv2/libGLESv3.cpp
+++ b/src/OpenGL/libGLESv2/libGLESv3.cpp
@@ -3233,7 +3233,18 @@
 		return error(GL_INVALID_VALUE);
 	}
 
-	UNIMPLEMENTED();
+	es2::Context *context = es2::getContext();
+
+	if(context)
+	{
+		es2::FenceSync *fenceSyncObject = context->getFenceSync(sync);
+		if(!fenceSyncObject)
+		{
+			return error(GL_INVALID_VALUE);
+		}
+
+		fenceSyncObject->getSynciv(pname, length, values);
+	}
 }
 
 GL_APICALL void GL_APIENTRY glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data)