#include <pipelinekey.h>
Public Member Functions | |
PipelineKey (const Shader &shader, EDrawMode drawMode, EDepthMode depthMode, EBlendMode blendMode, ShaderConstantHash constantHash, ECullWindingOrder cullWindingOrder, VkFormat colorFormat, VkFormat depthFormat, VkSampleCountFlagBits sampleCount, bool sampleShading, ECullMode cullMode, EPolygonMode polygonMode) | |
bool | operator== (const PipelineKey &rhs) const |
Public Attributes | |
const Shader * | mShader = nullptr |
EDrawMode | mDrawMode = EDrawMode::Triangles |
EDepthMode | mDepthMode = EDepthMode::NotSet |
EBlendMode | mBlendMode = EBlendMode::NotSet |
ECullWindingOrder | mCullWindingOrder = ECullWindingOrder::Clockwise |
VkFormat | mColorFormat = VK_FORMAT_UNDEFINED |
VkFormat | mDepthFormat = VK_FORMAT_UNDEFINED |
VkSampleCountFlagBits | mSampleCount = VK_SAMPLE_COUNT_1_BIT |
bool | mSampleShading = false |
ECullMode | mCullMode = ECullMode::Back |
EPolygonMode | mPolygonMode = EPolygonMode::Fill |
ShaderConstantHash | mConstantHash = 0 |
Key associated with a specific Vulkan graphics pipeline. The render engine uses this key to cache Vulkan pipelines so they can be re-used at runtime. Pipeline creation is considered a heavy Vulkan operation, we therefore cache pipelines to speed up rendering.
PipelineKey | ( | const Shader & | shader, |
EDrawMode | drawMode, | ||
EDepthMode | depthMode, | ||
EBlendMode | blendMode, | ||
ShaderConstantHash | constantHash, | ||
ECullWindingOrder | cullWindingOrder, | ||
VkFormat | colorFormat, | ||
VkFormat | depthFormat, | ||
VkSampleCountFlagBits | sampleCount, | ||
bool | sampleShading, | ||
ECullMode | cullMode, | ||
EPolygonMode | polygonMode | ||
) |
Creates the key based on the provided arguments.
bool operator== | ( | const PipelineKey & | rhs | ) | const |
EBlendMode mBlendMode = EBlendMode::NotSet |
VkFormat mColorFormat = VK_FORMAT_UNDEFINED |
ShaderConstantHash mConstantHash = 0 |
ECullMode mCullMode = ECullMode::Back |
ECullWindingOrder mCullWindingOrder = ECullWindingOrder::Clockwise |
VkFormat mDepthFormat = VK_FORMAT_UNDEFINED |
EDepthMode mDepthMode = EDepthMode::NotSet |
EDrawMode mDrawMode = EDrawMode::Triangles |
EPolygonMode mPolygonMode = EPolygonMode::Fill |
VkSampleCountFlagBits mSampleCount = VK_SAMPLE_COUNT_1_BIT |
bool mSampleShading = false |
const Shader* mShader = nullptr |