18#ifndef INCLUDED_RENDERER_BACKEND_VULKAN_PIPELINESTATE
19#define INCLUDED_RENDERER_BACKEND_VULKAN_PIPELINESTATE
27#include <glad/vulkan.h>
29#include <unordered_map>
62 static std::unique_ptr<CGraphicsPipelineState>
Create(
87 std::unordered_map<CacheKey, VkPipeline, CacheKeyHash, CacheKeyEqual>
m_PipelineMap;
108 static std::unique_ptr<CComputePipelineState>
Create(
A holder for precompiled compute pipeline description.
Definition: PipelineState.h:207
A holder for precompiled graphics pipeline description.
Definition: PipelineState.h:198
IShaderProgram is a container for multiple shaders of different types.
Definition: IShaderProgram.h:81
Definition: PipelineState.h:91
DeviceObjectUID m_UID
Definition: PipelineState.h:115
DeviceObjectUID GetUID() const
Definition: PipelineState.h:103
const SComputePipelineStateDesc & GetDesc() const
Definition: PipelineState.h:99
VkPipeline GetPipeline()
Definition: PipelineState.h:101
CComputePipelineState()=default
SComputePipelineStateDesc m_Desc
Definition: PipelineState.h:117
IDevice * GetDevice() override
Definition: PipelineState.cpp:343
CDevice * m_Device
Definition: PipelineState.h:113
~CComputePipelineState() override
Definition: PipelineState.cpp:336
static std::unique_ptr< CComputePipelineState > Create(CDevice *device, const SComputePipelineStateDesc &desc)
Definition: PipelineState.cpp:310
IShaderProgram * GetShaderProgram() const override
Definition: PipelineState.h:97
VkPipeline m_Pipeline
Definition: PipelineState.h:119
Definition: Framebuffer.h:41
Definition: PipelineState.h:44
const SGraphicsPipelineStateDesc & GetDesc() const
Definition: PipelineState.h:52
IDevice * GetDevice() override
Definition: PipelineState.cpp:304
CDevice * m_Device
Definition: PipelineState.h:67
DeviceObjectUID GetUID() const
Definition: PipelineState.h:57
std::unordered_map< CacheKey, VkPipeline, CacheKeyHash, CacheKeyEqual > m_PipelineMap
Definition: PipelineState.h:87
SGraphicsPipelineStateDesc m_Desc
Definition: PipelineState.h:71
~CGraphicsPipelineState() override
Definition: PipelineState.cpp:84
static std::unique_ptr< CGraphicsPipelineState > Create(CDevice *device, const SGraphicsPipelineStateDesc &desc)
Definition: PipelineState.cpp:73
DeviceObjectUID m_UID
Definition: PipelineState.h:69
VkPipeline GetOrCreatePipeline(const CVertexInputLayout *vertexInputLayout, CFramebuffer *framebuffer)
Definition: PipelineState.cpp:94
CGraphicsPipelineState()=default
IShaderProgram * GetShaderProgram() const override
Definition: PipelineState.h:50
static constexpr DeviceObjectUID INVALID_DEVICE_OBJECT_UID
Definition: DeviceObjectUID.h:41
uint32_t DeviceObjectUID
Unique identifier for a device object.
Definition: DeviceObjectUID.h:40
Backend
Definition: Backend.h:28
Definition: VideoMode.h:29
Definition: PipelineState.h:175
IShaderProgram * shaderProgram
Definition: PipelineState.h:178
Definition: PipelineState.h:165
IShaderProgram * shaderProgram
Definition: PipelineState.h:168
Definition: PipelineState.h:84
bool operator()(const CacheKey &lhs, const CacheKey &rhs) const
Definition: PipelineState.cpp:65
Definition: PipelineState.h:80
size_t operator()(const CacheKey &cacheKey) const
Definition: PipelineState.cpp:57
Definition: PipelineState.h:74
DeviceObjectUID vertexInputLayoutUID
Definition: PipelineState.h:75
DeviceObjectUID framebufferUID
Definition: PipelineState.h:77