9 #ifndef TALVOS_PIPELINECONTEXT_H
10 #define TALVOS_PIPELINECONTEXT_H
15 #include "vulkan/vulkan_core.h"
20 class ComputePipeline;
const GraphicsPipeline * getGraphicsPipeline() const
Returns the graphics pipeline.
Structure holding information about a descriptor binding.
VertexBindingMap VertexBindings
The vertex bindings.
const DescriptorSetMap & getGraphicsDescriptors() const
Returns the descriptor bindings for draw commands.
std::map< uint32_t, uint64_t > VertexBindingMap
Mapping from binding indexes to device memory addresses for vertex buffers.
DescriptorSetMap GraphicsDSM
The descriptors for draw commands.
void bindComputeDescriptors(const DescriptorSetMap &DSM)
Bind descriptor sets used for compute commands.
This class encapsulates pipeline state and bound resources.
const ComputePipeline * getComputePipeline() const
Returns the compute pipeline.
std::vector< VkRect2D > Scissors
The scissor rectangles.
uint8_t PushConstantData[PUSH_CONSTANT_MEM_SIZE]
Push constant data.
std::vector< VkViewport > Viewports
The viewports.
std::map< uint32_t, talvos::DescriptorSet > DescriptorSetMap
Mapping from set numbers to descriptor sets.
const std::vector< VkRect2D > & getScissors() const
Returns the scissor rectangles.
const GraphicsPipeline * GraphicsPL
The graphics pipeline.
void clear()
Clear the pipeline context.
This class encapsulates a graphics pipeline.
uint64_t Address
The memory address of the descriptor resource.
void bindVertexBuffer(uint32_t Binding, uint64_t Address)
Bind a vertex buffer.
const DescriptorSetMap & getComputeDescriptors() const
Returns the descriptor bindings for compute commands.
void bindComputePipeline(const ComputePipeline *PL)
Bind a compute pipeline.
void bindGraphicsPipeline(const GraphicsPipeline *PL)
Bind a graphics pipeline.
uint64_t NumBytes
The number of bytes that have been bound.
void bindGraphicsDescriptors(const DescriptorSetMap &DSM)
Bind descriptor sets used for draw commands.
const std::vector< VkViewport > & getViewports() const
Returns the viewports.
static const uint32_t PUSH_CONSTANT_MEM_SIZE
The number of bytes used for push constant data.
const uint8_t * getPushConstantData() const
Returns a pointer to the push constant data.
DescriptorSetMap ComputeDSM
The descriptors for compute commands.
std::map< std::pair< uint32_t, uint32_t >, BindingInfo > DescriptorSet
Mapping from a binding and array element index to an address in memory.
void setPushConstantData(uint32_t Offset, uint32_t NumBytes, const uint8_t *Data)
Set push constant data.
This class encapsulates a compute pipeline.
const ComputePipeline * ComputePL
The compute pipeline.
const VertexBindingMap & getVertexBindings() const
Returns the vertex bindings.