Lugdunum  0.1.0
Classes | Public Member Functions | Private Attributes | List of all members
lug::Graphics::Vulkan::API::Builder::GraphicsPipeline Class Reference

#include <GraphicsPipeline.hpp>

Collaboration diagram for lug::Graphics::Vulkan::API::Builder::GraphicsPipeline:
[legend]

Classes

class  ColorBlendState
 
class  DepthStencilState
 
class  InputBinding
 
class  MultisampleState
 
class  RasterizationState
 
class  ViewportState
 

Public Member Functions

 GraphicsPipeline (const API::Device &device)
 
 GraphicsPipeline (const GraphicsPipeline &)=delete
 
 GraphicsPipeline (GraphicsPipeline &&)=delete
 
GraphicsPipelineoperator= (const GraphicsPipeline &)=delete
 
GraphicsPipelineoperator= (GraphicsPipeline &&)=delete
 
 ~GraphicsPipeline ()=default
 
void setShader (VkShaderStageFlagBits stage, const char *entry, API::ShaderModule shaderModule)
 
bool setShaderFromFile (VkShaderStageFlagBits stage, const char *entry, const std::string &filename)
 
bool setShaderFromData (VkShaderStageFlagBits stage, const char *entry, const std::vector< uint32_t > &data)
 
InputBinding addInputBinding (uint32_t stride, VkVertexInputRate inputRate=VK_VERTEX_INPUT_RATE_VERTEX)
 
InputBinding addInputBinding (uint32_t binding, uint32_t stride, VkVertexInputRate inputRate=VK_VERTEX_INPUT_RATE_VERTEX)
 
void setInputAssemblyInfo (VkPrimitiveTopology topology, bool primitiveRestartEnable)
 
void setDynamicStates (const std::set< VkDynamicState > &dynamicStates)
 
void setPipelineLayout (API::PipelineLayout pipelineLayout)
 
void setRenderPass (API::RenderPass renderPass, uint32_t subpass)
 
void setPipelineCache (VkPipelineCache pipelineCache)
 
ViewportState getViewportState ()
 
RasterizationState getRasterizationState ()
 
MultisampleState getMultisampleState ()
 
DepthStencilState getDepthStencilState ()
 
ColorBlendState getColorBlendState ()
 
bool build (API::GraphicsPipeline &graphicPipeline, VkResult *returnResult=nullptr)
 
std::unique_ptr< API::GraphicsPipelinebuild (VkResult *returnResult=nullptr)
 

Private Attributes

const API::Device_device
 
std::vector< API::ShaderModule_shaderModules
 
std::vector< VkPipelineShaderStageCreateInfo > _shaderStages
 
std::vector< VkVertexInputBindingDescription > _inputBindings
 
std::vector< VkVertexInputAttributeDescription > _inputAttributes
 
VkPrimitiveTopology _topology {VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST}
 
bool _primitiveRestartEnable {VK_FALSE}
 
VkPipelineViewportStateCreateInfo _viewportState
 
std::vector< VkViewport > _viewports
 
std::vector< VkRect2D > _scissors
 
VkPipelineRasterizationStateCreateInfo _rasterizationState
 
VkPipelineMultisampleStateCreateInfo _multisampleState
 
VkPipelineDepthStencilStateCreateInfo _depthStencilState
 
VkPipelineColorBlendStateCreateInfo _colorBlendState
 
std::vector< VkPipelineColorBlendAttachmentState > _colorBlendAttachments
 
std::set< VkDynamicState > _dynamicStates
 
API::PipelineLayout _pipelineLayout
 
API::RenderPass _renderPass
 
uint32_t _subpass {0}
 
VkPipelineCache _pipelineCache {VK_NULL_HANDLE}
 

Detailed Description

Definition at line 23 of file GraphicsPipeline.hpp.

Constructor & Destructor Documentation

◆ GraphicsPipeline() [1/3]

lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::GraphicsPipeline ( const API::Device device)

Definition at line 11 of file GraphicsPipeline.cpp.

◆ GraphicsPipeline() [2/3]

lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::GraphicsPipeline ( const GraphicsPipeline )
delete

◆ GraphicsPipeline() [3/3]

lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::GraphicsPipeline ( GraphicsPipeline &&  )
delete

◆ ~GraphicsPipeline()

lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::~GraphicsPipeline ( )
default

Member Function Documentation

◆ operator=() [1/2]

GraphicsPipeline& lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::operator= ( const GraphicsPipeline )
delete

◆ operator=() [2/2]

GraphicsPipeline& lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::operator= ( GraphicsPipeline &&  )
delete

◆ setShader()

void GraphicsPipeline::setShader ( VkShaderStageFlagBits  stage,
const char *  entry,
API::ShaderModule  shaderModule 
)
inline

Definition at line 197 of file GraphicsPipeline.inl.

◆ setShaderFromFile()

bool GraphicsPipeline::setShaderFromFile ( VkShaderStageFlagBits  stage,
const char *  entry,
const std::string &  filename 
)
inline

Definition at line 212 of file GraphicsPipeline.inl.

◆ setShaderFromData()

bool GraphicsPipeline::setShaderFromData ( VkShaderStageFlagBits  stage,
const char *  entry,
const std::vector< uint32_t > &  data 
)
inline

Definition at line 231 of file GraphicsPipeline.inl.

◆ addInputBinding() [1/2]

InputBinding lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::addInputBinding ( uint32_t  stride,
VkVertexInputRate  inputRate = VK_VERTEX_INPUT_RATE_VERTEX 
)

◆ addInputBinding() [2/2]

InputBinding lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::addInputBinding ( uint32_t  binding,
uint32_t  stride,
VkVertexInputRate  inputRate = VK_VERTEX_INPUT_RATE_VERTEX 
)

◆ setInputAssemblyInfo()

void GraphicsPipeline::setInputAssemblyInfo ( VkPrimitiveTopology  topology,
bool  primitiveRestartEnable 
)
inline

Definition at line 266 of file GraphicsPipeline.inl.

◆ setDynamicStates()

void GraphicsPipeline::setDynamicStates ( const std::set< VkDynamicState > &  dynamicStates)
inline

Definition at line 271 of file GraphicsPipeline.inl.

◆ setPipelineLayout()

void GraphicsPipeline::setPipelineLayout ( API::PipelineLayout  pipelineLayout)
inline

Definition at line 275 of file GraphicsPipeline.inl.

◆ setRenderPass()

void GraphicsPipeline::setRenderPass ( API::RenderPass  renderPass,
uint32_t  subpass 
)
inline

Definition at line 279 of file GraphicsPipeline.inl.

◆ setPipelineCache()

void GraphicsPipeline::setPipelineCache ( VkPipelineCache  pipelineCache)
inline

Definition at line 284 of file GraphicsPipeline.inl.

◆ getViewportState()

GraphicsPipeline::ViewportState GraphicsPipeline::getViewportState ( )
inline

Definition at line 288 of file GraphicsPipeline.inl.

◆ getRasterizationState()

GraphicsPipeline::RasterizationState GraphicsPipeline::getRasterizationState ( )
inline

Definition at line 292 of file GraphicsPipeline.inl.

◆ getMultisampleState()

GraphicsPipeline::MultisampleState GraphicsPipeline::getMultisampleState ( )
inline

Definition at line 296 of file GraphicsPipeline.inl.

◆ getDepthStencilState()

GraphicsPipeline::DepthStencilState GraphicsPipeline::getDepthStencilState ( )
inline

Definition at line 300 of file GraphicsPipeline.inl.

◆ getColorBlendState()

GraphicsPipeline::ColorBlendState GraphicsPipeline::getColorBlendState ( )
inline

Definition at line 304 of file GraphicsPipeline.inl.

◆ build() [1/2]

bool lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::build ( API::GraphicsPipeline graphicPipeline,
VkResult *  returnResult = nullptr 
)

Definition at line 13 of file GraphicsPipeline.cpp.

◆ build() [2/2]

std::unique_ptr< API::GraphicsPipeline > lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::build ( VkResult *  returnResult = nullptr)

Definition at line 95 of file GraphicsPipeline.cpp.

Member Data Documentation

◆ _device

const API::Device& lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_device
private

Definition at line 239 of file GraphicsPipeline.hpp.

◆ _shaderModules

std::vector<API::ShaderModule> lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_shaderModules
private

Definition at line 242 of file GraphicsPipeline.hpp.

◆ _shaderStages

std::vector<VkPipelineShaderStageCreateInfo> lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_shaderStages
private

Definition at line 243 of file GraphicsPipeline.hpp.

◆ _inputBindings

std::vector<VkVertexInputBindingDescription> lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_inputBindings
private

Definition at line 246 of file GraphicsPipeline.hpp.

◆ _inputAttributes

std::vector<VkVertexInputAttributeDescription> lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_inputAttributes
private

Definition at line 247 of file GraphicsPipeline.hpp.

◆ _topology

VkPrimitiveTopology lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_topology {VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST}
private

Definition at line 250 of file GraphicsPipeline.hpp.

◆ _primitiveRestartEnable

bool lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_primitiveRestartEnable {VK_FALSE}
private

Definition at line 251 of file GraphicsPipeline.hpp.

◆ _viewportState

VkPipelineViewportStateCreateInfo lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_viewportState
private
Initial value:
{
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO,
nullptr,
0,
0,
nullptr,
0,
nullptr
}

Definition at line 254 of file GraphicsPipeline.hpp.

◆ _viewports

std::vector<VkViewport> lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_viewports
private

Definition at line 264 of file GraphicsPipeline.hpp.

◆ _scissors

std::vector<VkRect2D> lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_scissors
private

Definition at line 265 of file GraphicsPipeline.hpp.

◆ _rasterizationState

VkPipelineRasterizationStateCreateInfo lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_rasterizationState
private
Initial value:
{
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO,
nullptr,
0,
VK_FALSE,
VK_FALSE,
VK_POLYGON_MODE_FILL,
VK_CULL_MODE_BACK_BIT,
VK_FRONT_FACE_COUNTER_CLOCKWISE,
VK_FALSE,
0.0f,
0.0f,
0.0f,
1.0f
}

Definition at line 268 of file GraphicsPipeline.hpp.

◆ _multisampleState

VkPipelineMultisampleStateCreateInfo lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_multisampleState
private
Initial value:
{
VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO,
nullptr,
0,
VK_SAMPLE_COUNT_1_BIT,
VK_FALSE,
0.0f,
nullptr,
VK_FALSE,
VK_FALSE
}

Definition at line 285 of file GraphicsPipeline.hpp.

◆ _depthStencilState

VkPipelineDepthStencilStateCreateInfo lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_depthStencilState
private
Initial value:
{
VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO,
nullptr,
0,
VK_FALSE,
VK_FALSE,
VK_COMPARE_OP_NEVER,
VK_FALSE,
VK_FALSE,
{},
{},
0.0f,
0.0f
}

Definition at line 298 of file GraphicsPipeline.hpp.

◆ _colorBlendState

VkPipelineColorBlendStateCreateInfo lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_colorBlendState
private
Initial value:
{
VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO,
nullptr,
0,
VK_FALSE,
VK_LOGIC_OP_CLEAR,
0,
nullptr,
{0.0f, 0.0f, 0.0f, 0.0f}
}

Definition at line 314 of file GraphicsPipeline.hpp.

◆ _colorBlendAttachments

std::vector<VkPipelineColorBlendAttachmentState> lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_colorBlendAttachments
private

Definition at line 325 of file GraphicsPipeline.hpp.

◆ _dynamicStates

std::set<VkDynamicState> lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_dynamicStates
private

Definition at line 328 of file GraphicsPipeline.hpp.

◆ _pipelineLayout

API::PipelineLayout lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_pipelineLayout
private

Definition at line 331 of file GraphicsPipeline.hpp.

◆ _renderPass

API::RenderPass lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_renderPass
private

Definition at line 332 of file GraphicsPipeline.hpp.

◆ _subpass

uint32_t lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_subpass {0}
private

Definition at line 333 of file GraphicsPipeline.hpp.

◆ _pipelineCache

VkPipelineCache lug::Graphics::Vulkan::API::Builder::GraphicsPipeline::_pipelineCache {VK_NULL_HANDLE}
private

Definition at line 334 of file GraphicsPipeline.hpp.


The documentation for this class was generated from the following files: