Talvos  0.1
SPIR-V interpreter and dynamic analysis framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
talvos::PipelineContext Class Reference

This class encapsulates pipeline state and bound resources. More...

#include <talvos/PipelineContext.h>

Public Member Functions

void bindComputeDescriptors (const DescriptorSetMap &DSM)
 Bind descriptor sets used for compute commands. More...
 
void bindComputePipeline (const ComputePipeline *PL)
 Bind a compute pipeline. More...
 
void bindGraphicsDescriptors (const DescriptorSetMap &DSM)
 Bind descriptor sets used for draw commands. More...
 
void bindGraphicsPipeline (const GraphicsPipeline *PL)
 Bind a graphics pipeline. More...
 
void bindVertexBuffer (uint32_t Binding, uint64_t Address)
 Bind a vertex buffer. More...
 
void clear ()
 Clear the pipeline context. More...
 
const DescriptorSetMapgetComputeDescriptors () const
 Returns the descriptor bindings for compute commands. More...
 
const ComputePipelinegetComputePipeline () const
 Returns the compute pipeline. More...
 
const DescriptorSetMapgetGraphicsDescriptors () const
 Returns the descriptor bindings for draw commands. More...
 
const GraphicsPipelinegetGraphicsPipeline () const
 Returns the graphics pipeline. More...
 
const uint8_t * getPushConstantData () const
 Returns a pointer to the push constant data. More...
 
const std::vector< VkRect2D > & getScissors () const
 Returns the scissor rectangles. More...
 
const VertexBindingMapgetVertexBindings () const
 Returns the vertex bindings. More...
 
const std::vector< VkViewport > & getViewports () const
 Returns the viewports. More...
 
void setPushConstantData (uint32_t Offset, uint32_t NumBytes, const uint8_t *Data)
 Set push constant data. More...
 

Static Public Attributes

static const uint32_t PUSH_CONSTANT_MEM_SIZE = 128
 The number of bytes used for push constant data. More...
 

Private Attributes

const ComputePipelineComputePL = nullptr
 The compute pipeline. More...
 
const GraphicsPipelineGraphicsPL = nullptr
 The graphics pipeline. More...
 
DescriptorSetMap ComputeDSM
 The descriptors for compute commands. More...
 
DescriptorSetMap GraphicsDSM
 The descriptors for draw commands. More...
 
uint8_t PushConstantData [PUSH_CONSTANT_MEM_SIZE]
 Push constant data. More...
 
std::vector< VkViewport > Viewports
 The viewports. More...
 
std::vector< VkRect2D > Scissors
 The scissor rectangles. More...
 
VertexBindingMap VertexBindings
 The vertex bindings. More...
 

Detailed Description

This class encapsulates pipeline state and bound resources.

A instance of this class used by compute and draw commands when launching shaders.

Definition at line 42 of file PipelineContext.h.

Member Function Documentation

void talvos::PipelineContext::bindComputeDescriptors ( const DescriptorSetMap DSM)

Bind descriptor sets used for compute commands.

Definition at line 18 of file PipelineContext.cpp.

void talvos::PipelineContext::bindComputePipeline ( const ComputePipeline PL)

Bind a compute pipeline.

Definition at line 24 of file PipelineContext.cpp.

void talvos::PipelineContext::bindGraphicsDescriptors ( const DescriptorSetMap DSM)

Bind descriptor sets used for draw commands.

Definition at line 29 of file PipelineContext.cpp.

void talvos::PipelineContext::bindGraphicsPipeline ( const GraphicsPipeline PL)

Bind a graphics pipeline.

Definition at line 35 of file PipelineContext.cpp.

void talvos::PipelineContext::bindVertexBuffer ( uint32_t  Binding,
uint64_t  Address 
)

Bind a vertex buffer.

Definition at line 42 of file PipelineContext.cpp.

void talvos::PipelineContext::clear ( )

Clear the pipeline context.

Definition at line 47 of file PipelineContext.cpp.

const DescriptorSetMap& talvos::PipelineContext::getComputeDescriptors ( ) const
inline

Returns the descriptor bindings for compute commands.

Definition at line 67 of file PipelineContext.h.

const ComputePipeline* talvos::PipelineContext::getComputePipeline ( ) const
inline

Returns the compute pipeline.

Definition at line 70 of file PipelineContext.h.

const DescriptorSetMap& talvos::PipelineContext::getGraphicsDescriptors ( ) const
inline

Returns the descriptor bindings for draw commands.

Definition at line 73 of file PipelineContext.h.

const GraphicsPipeline* talvos::PipelineContext::getGraphicsPipeline ( ) const
inline

Returns the graphics pipeline.

Definition at line 76 of file PipelineContext.h.

const uint8_t* talvos::PipelineContext::getPushConstantData ( ) const
inline

Returns a pointer to the push constant data.

Definition at line 79 of file PipelineContext.h.

const std::vector<VkRect2D>& talvos::PipelineContext::getScissors ( ) const
inline

Returns the scissor rectangles.

Definition at line 82 of file PipelineContext.h.

const VertexBindingMap& talvos::PipelineContext::getVertexBindings ( ) const
inline

Returns the vertex bindings.

Definition at line 85 of file PipelineContext.h.

const std::vector<VkViewport>& talvos::PipelineContext::getViewports ( ) const
inline

Returns the viewports.

Definition at line 88 of file PipelineContext.h.

void talvos::PipelineContext::setPushConstantData ( uint32_t  Offset,
uint32_t  NumBytes,
const uint8_t *  Data 
)

Set push constant data.

Definition at line 57 of file PipelineContext.cpp.

Member Data Documentation

DescriptorSetMap talvos::PipelineContext::ComputeDSM
private

The descriptors for compute commands.

Definition at line 98 of file PipelineContext.h.

const ComputePipeline* talvos::PipelineContext::ComputePL = nullptr
private

The compute pipeline.

Definition at line 95 of file PipelineContext.h.

DescriptorSetMap talvos::PipelineContext::GraphicsDSM
private

The descriptors for draw commands.

Definition at line 99 of file PipelineContext.h.

const GraphicsPipeline* talvos::PipelineContext::GraphicsPL = nullptr
private

The graphics pipeline.

Definition at line 96 of file PipelineContext.h.

const uint32_t talvos::PipelineContext::PUSH_CONSTANT_MEM_SIZE = 128
static

The number of bytes used for push constant data.

Definition at line 46 of file PipelineContext.h.

uint8_t talvos::PipelineContext::PushConstantData[PUSH_CONSTANT_MEM_SIZE]
private

Push constant data.

Definition at line 101 of file PipelineContext.h.

std::vector<VkRect2D> talvos::PipelineContext::Scissors
private

The scissor rectangles.

Definition at line 105 of file PipelineContext.h.

VertexBindingMap talvos::PipelineContext::VertexBindings
private

The vertex bindings.

Definition at line 107 of file PipelineContext.h.

std::vector<VkViewport> talvos::PipelineContext::Viewports
private

The viewports.

Definition at line 103 of file PipelineContext.h.