Vulkan: Implement a pipeline UID cache

This stores enough information to recreate the pipeline, including the
shader UIDs, blend/depth/rasterization state, primitive and vertex format.
This commit is contained in:
Stenzek
2016-11-13 18:39:06 +10:00
parent 681294586b
commit aac66a1b61
7 changed files with 227 additions and 40 deletions

View File

@ -16,6 +16,11 @@ class VertexFormat : public ::NativeVertexFormat
public:
VertexFormat(const PortableVertexDeclaration& in_vtx_decl);
// Creates or obtains a pointer to a VertexFormat representing decl.
// If this results in a VertexFormat being created, if the game later uses a matching vertex
// declaration, the one that was previously created will be used.
static VertexFormat* GetOrCreateMatchingFormat(const PortableVertexDeclaration& decl);
// Passed to pipeline state creation
const VkPipelineVertexInputStateCreateInfo& GetVertexInputStateInfo() const
{