Support more 10_10_10_2 formats as vertex attributes

Vertex input buffers only support VK_FORMAT_A2B10G10R10_UNORM_PACK32.
This cl adds all the signed and integer variants of that format.

This cl also removes StreamType and replaces it with VkFormat.

Tests: dEQP-VK.*r10*
Bug: b/142661203
Change-Id: I996705395cbb493c599e1a460a6368a7e00d5a55
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/40348
Tested-by: Alexis Hétu <sugoi@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Device/VertexProcessor.cpp b/src/Device/VertexProcessor.cpp
index 3f72121..88359a2 100644
--- a/src/Device/VertexProcessor.cpp
+++ b/src/Device/VertexProcessor.cpp
@@ -44,32 +44,6 @@
 	return hash;
 }
 
-unsigned int VertexProcessor::States::Input::bytesPerAttrib() const
-{
-	switch(type)
-	{
-		case STREAMTYPE_FLOAT:
-		case STREAMTYPE_INT:
-		case STREAMTYPE_UINT:
-			return count * sizeof(uint32_t);
-		case STREAMTYPE_HALF:
-		case STREAMTYPE_SHORT:
-		case STREAMTYPE_USHORT:
-			return count * sizeof(uint16_t);
-		case STREAMTYPE_BYTE:
-		case STREAMTYPE_SBYTE:
-			return count * sizeof(uint8_t);
-		case STREAMTYPE_COLOR:
-		case STREAMTYPE_2_10_10_10_INT:
-		case STREAMTYPE_2_10_10_10_UINT:
-			return sizeof(int);
-		default:
-			UNSUPPORTED("stream.type %d", int(type));
-	}
-
-	return 0;
-}
-
 bool VertexProcessor::State::operator==(const State &state) const
 {
 	if(hash != state.hash)
@@ -109,9 +83,7 @@
 
 	for(int i = 0; i < MAX_INTERFACE_COMPONENTS / 4; i++)
 	{
-		state.input[i].type = context->input[i].type;
-		state.input[i].count = context->input[i].count;
-		state.input[i].normalized = context->input[i].normalized;
+		state.input[i].format = context->input[i].format;
 		// TODO: get rid of attribType -- just keep the VK format all the way through, this fully determines
 		// how to handle the attribute.
 		state.input[i].attribType = context->vertexShader->inputs[i * 4].Type;