Fix handling Memset<> assignment and comparison

Previously the compiler would implicitly declare a copy constructor and
assignment operator for classes derived from Memset<>, if they didn't
have user-defined ones. This can cause them to have uninitialized
padding bytes. By defining them ourselves using memcpy() we can ensure
they're zero-initialized.

Also define equality and less-than operators. The latter makes classes
derived from Memset<> suitable as std::map<> keys.

is_memcmparable<> now no longer works on classed derived from Memset<>,
because it uses std::is_trivially_copyable<> which isn't true when a
user-defined copy constructor or assignment operator is provided.
Instead just rely on Memset<>'s new equality operators.

Bug: b/131246679
Change-Id: I6e4963db8186955d8d3d3ef356fa42ef6a024c64
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42728
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/src/Device/VertexProcessor.cpp b/src/Device/VertexProcessor.cpp
index c7f4d54..a2a33c5 100644
--- a/src/Device/VertexProcessor.cpp
+++ b/src/Device/VertexProcessor.cpp
@@ -51,8 +51,7 @@
 		return false;
 	}
 
-	static_assert(is_memcmparable<State>::value, "Cannot memcmp States");
-	return memcmp(static_cast<const States *>(this), static_cast<const States *>(&state), sizeof(States)) == 0;
+	return *static_cast<const States *>(this) == static_cast<const States &>(state);
 }
 
 VertexProcessor::VertexProcessor()