NAP
Public Member Functions | Public Attributes | List of all members
PipelineKey Struct Reference

#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 ShadermShader = 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
 

Description

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.

Collaboration diagram for PipelineKey:
[legend]

Constructor & Destructor Documentation

◆ PipelineKey()

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.

Member Function Documentation

◆ operator==()

bool operator== ( const PipelineKey rhs) const

Member Data Documentation

◆ mBlendMode

◆ mColorFormat

VkFormat mColorFormat = VK_FORMAT_UNDEFINED

◆ mConstantHash

ShaderConstantHash mConstantHash = 0

◆ mCullMode

◆ mCullWindingOrder

◆ mDepthFormat

VkFormat mDepthFormat = VK_FORMAT_UNDEFINED

◆ mDepthMode

◆ mDrawMode

◆ mPolygonMode

◆ mSampleCount

VkSampleCountFlagBits mSampleCount = VK_SAMPLE_COUNT_1_BIT

◆ mSampleShading

bool mSampleShading = false

◆ mShader

const Shader* mShader = nullptr