Initial stub implementation of SpirvShader

This will eventually replace Shader and related subclasses. The
interesting bit here is the instruction iterator, which allows fairly
safe access to the instruction stream without needing the rest of the
code to care too much about the physical layout.

Bug: b/120799499

Change-Id: Id0d94c4b807ddb1e4325de147ca1f651171779b7
Reviewed-on: https://swiftshader-review.googlesource.com/c/23049
Reviewed-by: Corentin Wallez <cwallez@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Chris Forbes <chrisforbes@google.com>
diff --git a/src/Vulkan/VkShaderModule.cpp b/src/Vulkan/VkShaderModule.cpp
index 4c824a3..b48c909 100644
--- a/src/Vulkan/VkShaderModule.cpp
+++ b/src/Vulkan/VkShaderModule.cpp
@@ -22,6 +22,7 @@
 ShaderModule::ShaderModule(const VkShaderModuleCreateInfo* pCreateInfo, void* mem) : code(reinterpret_cast<uint32_t*>(mem))
 {
 	memcpy(code, pCreateInfo->pCode, pCreateInfo->codeSize);
+	wordCount = static_cast<uint32_t>(pCreateInfo->codeSize / sizeof(uint32_t));
 }
 
 void ShaderModule::destroy(const VkAllocationCallbacks* pAllocator)
@@ -34,10 +35,4 @@
 	return pCreateInfo->codeSize;
 }
 
-rr::Routine* ShaderModule::compile(const VkAllocationCallbacks* pAllocator)
-{
-	// FIXME: Compile the code here
-	return nullptr;
-}
-
 } // namespace vk