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

This class encapsulates information about an indexed draw command. More...

#include <talvos/Commands.h>

Inheritance diagram for talvos::DrawIndexedCommand:
talvos::DrawCommandBase talvos::Command

Public Member Functions

 DrawIndexedCommand (const PipelineContext &PC, const std::shared_ptr< RenderPassInstance > RPI, uint32_t NumVertices, uint32_t IndexOffset, uint32_t VertexOffset, uint32_t NumInstances, uint32_t InstanceOffset, uint64_t IndexBaseAddress, VkIndexType IndexType)
 Create a new DrawIndexedCommand. More...
 
uint64_t getIndexBaseAddress () const
 Returns the address in memory of the indices. More...
 
uint32_t getIndexOffset () const
 Returns the offset of the first index. More...
 
VkIndexType getIndexType () const
 Returns the type of the indices. More...
 
- Public Member Functions inherited from talvos::DrawCommandBase
 DrawCommandBase (Type Ty, const PipelineContext &PC, const std::shared_ptr< RenderPassInstance > RPI, uint32_t NumVertices, uint32_t VertexOffset, uint32_t NumInstances, uint32_t InstanceOffset)
 Create a new DrawCommandBase. More...
 
uint32_t getInstanceOffset () const
 Returns the offset of the first instance. More...
 
uint32_t getNumInstances () const
 Returns the number of instances. More...
 
uint32_t getNumVertices () const
 Returns the number of vertices. More...
 
const PipelineContextgetPipelineContext () const
 Returns the pipeline context. More...
 
const RenderPassInstancegetRenderPassInstance () const
 Returns the render pass instance used by this command. More...
 
uint32_t getVertexOffset () const
 Returns the offset of the first vertex. More...
 
void setRenderPassInstance (const std::shared_ptr< RenderPassInstance > RPI)
 Set the render pass instance used by this command. More...
 
- Public Member Functions inherited from talvos::Command
Type getType () const
 Returns the type of this command. More...
 
void run (Device &Dev) const
 Run this command on Dev. More...
 

Protected Member Functions

virtual void runImpl (Device &Dev) const override
 Command execution handler. More...
 
- Protected Member Functions inherited from talvos::Command
 Command (Type Ty)
 Used by subclasses to initialize the command type. More...
 

Private Attributes

uint32_t IndexOffset
 Offset of the first index. More...
 
uint64_t IndexBaseAddress
 Address of the indices. More...
 
VkIndexType IndexType
 Type of the indices;. More...
 

Additional Inherited Members

- Public Types inherited from talvos::Command
enum  Type {
  BEGIN_RENDER_PASS, BLIT_IMAGE, CLEAR_ATTACHMENT, CLEAR_COLOR_IMAGE,
  COPY_BUFFER, COPY_BUFFER_TO_IMAGE, COPY_IMAGE, COPY_IMAGE_TO_BUFFER,
  DISPATCH, DRAW, DRAW_INDEXED, END_RENDER_PASS,
  FILL_BUFFER, NEXT_SUBPASS, SET_EVENT, RESET_EVENT,
  UPDATE_BUFFER, WAIT_EVENTS
}
 Identifies different Command subclasses. More...
 
- Protected Attributes inherited from talvos::Command
Type Ty
 The type of this command. More...
 

Detailed Description

This class encapsulates information about an indexed draw command.

Definition at line 395 of file Commands.h.

Constructor & Destructor Documentation

talvos::DrawIndexedCommand::DrawIndexedCommand ( const PipelineContext PC,
const std::shared_ptr< RenderPassInstance RPI,
uint32_t  NumVertices,
uint32_t  IndexOffset,
uint32_t  VertexOffset,
uint32_t  NumInstances,
uint32_t  InstanceOffset,
uint64_t  IndexBaseAddress,
VkIndexType  IndexType 
)
inline

Create a new DrawIndexedCommand.

Parameters
PCThe pipeline context used for the draw command.
RPIThe render pass instance to use.
NumVerticesThe number of vertices to draw.
IndexOffsetThe offset of the first index.
VertexOffsetThe offset of the first vertex.
NumInstancesThe number of instances to draw.
InstanceOffsetThe offset of the first instance.
IndexBaseAddressThe address in memory of the indices.
IndexTypeThe type of the indices.

Definition at line 409 of file Commands.h.

Member Function Documentation

uint64_t talvos::DrawIndexedCommand::getIndexBaseAddress ( ) const
inline

Returns the address in memory of the indices.

Definition at line 421 of file Commands.h.

uint32_t talvos::DrawIndexedCommand::getIndexOffset ( ) const
inline

Returns the offset of the first index.

Definition at line 424 of file Commands.h.

VkIndexType talvos::DrawIndexedCommand::getIndexType ( ) const
inline

Returns the type of the indices.

Definition at line 427 of file Commands.h.

void talvos::DrawIndexedCommand::runImpl ( Device Dev) const
overrideprotectedvirtual

Command execution handler.

Implements talvos::DrawCommandBase.

Definition at line 349 of file Commands.cpp.

Member Data Documentation

uint64_t talvos::DrawIndexedCommand::IndexBaseAddress
private

Address of the indices.

Definition at line 435 of file Commands.h.

uint32_t talvos::DrawIndexedCommand::IndexOffset
private

Offset of the first index.

Definition at line 434 of file Commands.h.

VkIndexType talvos::DrawIndexedCommand::IndexType
private

Type of the indices;.

Definition at line 436 of file Commands.h.