Talvos  0.1
SPIR-V interpreter and dynamic analysis framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Typedefs | Enumerations | Functions
talvos Namespace Reference

Classes

class  Block
 A block of instructions ending with a termination instruction. More...
 
class  Command
 This class is a base class for all commands. More...
 
class  BeginRenderPassCommand
 This class encapsulates information about a begin render pass command. More...
 
class  BlitImageCommand
 This class encapsulates information about a blit image command. More...
 
class  ClearAttachmentCommand
 This class encapsulates information about a clear attachment command. More...
 
class  ClearColorImageCommand
 This class encapsulates information about a clear color image command. More...
 
class  CopyBufferCommand
 This class encapsulates information about a copy buffer command. More...
 
class  CopyBufferToImageCommand
 This class encapsulates information about a copy buffer to image command. More...
 
class  CopyImageCommand
 This class encapsulates information about a copy image command. More...
 
class  CopyImageToBufferCommand
 This class encapsulates information about a copy image to buffer command. More...
 
class  DispatchCommand
 This class encapsulates information about a compute kernel launch. More...
 
class  DrawCommandBase
 This is an abstract base class for draw commands. More...
 
class  DrawCommand
 This class encapsulates information about a draw command. More...
 
class  DrawIndexedCommand
 This class encapsulates information about an indexed draw command. More...
 
class  EndRenderPassCommand
 This class encapsulates information about an end render pass command. More...
 
class  FillBufferCommand
 This class encapsulates information about a fill buffer command. More...
 
class  NextSubpassCommand
 This class encapsulates information about a next subpass command. More...
 
class  ResetEventCommand
 This class encapsulates information about a reset event command. More...
 
class  SetEventCommand
 This class encapsulates information about a set event command. More...
 
class  UpdateBufferCommand
 This class encapsulates information about an update buffer command. More...
 
class  WaitEventsCommand
 This class encapsulates information about a wait events command. More...
 
class  ComputePipeline
 This class encapsulates a compute pipeline. More...
 
class  Device
 A Device instance encapsulates properties and state for the virtual device. More...
 
class  Dim3
 Class representing a 3-dimensional size or ID. More...
 
class  EntryPoint
 This class represents a shader entry point. More...
 
class  Function
 This class represents a function in a SPIR-V Module. More...
 
class  GraphicsPipeline
 This class encapsulates a graphics pipeline. More...
 
class  Image
 This class represents an image object. More...
 
class  ImageView
 This class represents a view into a range of image subresources. More...
 
class  Sampler
 This class represents a sampler object. More...
 
struct  SampledImage
 A combination of an image and a sampler used to access it. More...
 
class  Instruction
 This class represents a SPIR-V instruction. More...
 
class  Invocation
 This class represents a single execution of a SPIR-V entry point. More...
 
class  Memory
 This class represents an address space in the virtual device. More...
 
class  Module
 This class represents a SPIR-V module. More...
 
struct  PtrMatrixLayout
 Structure to describe the memory layout of a matrix. More...
 
struct  DescriptorElement
 Structure used to hold information about an element of a descriptor array. More...
 
class  Object
 This class represents an instruction result. More...
 
struct  BindingInfo
 Structure holding information about a descriptor binding. More...
 
class  PipelineContext
 This class encapsulates pipeline state and bound resources. More...
 
class  PipelineStage
 This class encapsulates information about a pipeline stage. More...
 
class  Plugin
 Base class for Talvos plugins. More...
 
class  Queue
 This class represents a queue for executing commands on a device. More...
 
class  Framebuffer
 This class represents a framebuffer that can be used for rendering. More...
 
struct  Subpass
 This structure describes the attachments used by a subpass. More...
 
class  RenderPass
 This class represents a Vulkan render pass. More...
 
class  RenderPassInstance
 This class represents an instance of a render pass being used for drawing. More...
 
class  Type
 This class represents a SPIR-V type. More...
 
class  Variable
 This class represents a module-scope variable declaration. More...
 
class  Workgroup
 This class represents a workgroup executing a compute command. More...
 
class  ModuleBuilder
 Internal class used to construct a Module during SPIRV-Tools parsing. More...
 
class  PipelineExecutorKey
 Only allow Device objects to create PipelineExecutor instances. More...
 
struct  Vec4
 
class  PipelineExecutor
 An internal class that handles pipeline execution, including the interactive debugger. More...
 

Typedefs

typedef std::vector< const
Variable * > 
VariableList
 A list of module scope variables. More...
 
typedef std::vector
< VkVertexInputAttributeDescription > 
VertexAttributeDescriptionList
 A list of vertex attribute descriptions. More...
 
typedef std::vector
< VkVertexInputBindingDescription > 
VertexBindingDescriptionList
 A list of vertex binding descriptions. More...
 
typedef std::vector
< VkPipelineColorBlendAttachmentState > 
BlendAttachmentStateList
 A list of pipeline color blend attachment states. More...
 
typedef std::map< uint32_t,
uint64_t > 
VertexBindingMap
 Mapping from binding indexes to device memory addresses for vertex buffers. More...
 
typedef std::map< std::pair
< uint32_t, uint32_t >
, BindingInfo
DescriptorSet
 Mapping from a binding and array element index to an address in memory. More...
 
typedef std::map< uint32_t,
talvos::DescriptorSet
DescriptorSetMap
 Mapping from set numbers to descriptor sets. More...
 
typedef std::map< uint32_t,
Object
SpecConstantMap
 Mapping from specialization constant ID to Object values. More...
 
typedef std::vector< std::pair
< const Type *, std::map
< uint32_t, uint32_t > > > 
StructElementTypeList
 A list of types used for structure members. More...
 
typedef Plugin *(* CreatePluginFunc )(const Device *)
 
typedef void(* DestroyPluginFunc )(Plugin *)
 

Enumerations

enum  MemoryScope { MemoryScope::Device, MemoryScope::Workgroup, MemoryScope::Invocation }
 Describes the scope of a memory instance. More...
 

Functions

uint32_t getElementSize (VkFormat Format)
 Returns the size in bytes for each element of an image with type Format. More...
 
bool hasAlphaChannel (VkFormat Format)
 Returns true if Format includes an alpha channel. More...
 
std::ostream & operator<< (std::ostream &Stream, const Dim3 &D)
 
spv_result_t HandleHeader (void *user_data, spv_endianness_t endian, uint32_t, uint32_t version, uint32_t generator, uint32_t id_bound, uint32_t schema)
 Callback for SPIRV-Tools parsing a SPIR-V header. More...
 
spv_result_t HandleInstruction (void *user_data, const spv_parsed_instruction_t *parsed_instruction)
 Callback for SPIRV-Tools parsing a SPIR-V instruction. More...
 
void print (std::ostream &Stream, uint8_t *Data, const Type *Ty)
 Recursively print typed data to a stream. More...
 
std::ostream & operator<< (std::ostream &Stream, const Object &O)
 
void interpolate (Object &Output, const Type *Ty, size_t Offset, const Object &FA, const Object &FB, const Object &FC, float AW, float BW, float CW, float InvW, float a, float b, float c, bool Flat, bool Perspective)
 Recursively populate a fragment shader input variable by interpolating between the vertex shader output variables in a triangle. More...
 
float XDevToFB (float Xd, VkViewport Viewport)
 
float XFBToDev (float Xfb, VkViewport Viewport)
 
float YDevToFB (float Yd, VkViewport Viewport)
 
float YFBToDev (float Yfb, VkViewport Viewport)
 
void blendTexel (Image::Texel &NewTexel, const Image::Texel &OldTexel, const VkPipelineColorBlendAttachmentState &Blend, const std::array< float, 4 > &BlendConstants)
 
template<typename T >
void loadNormalizedVertexInput (Object &Obj, VkFormat Format, const Memory &Mem, uint64_t Address)
 
std::ostream & operator<< (std::ostream &Stream, const Type *Ty)
 
bool checkEnv (const char *Name, bool Default)
 Returns true if the environment variable Name is set to 1, false for 0, or Default if it is not set. More...
 
unsigned long getEnvUInt (const char *Name, unsigned Default)
 Returns the integer value for the environment variable Name, or Default if it is not set. More...
 
 INSTANTIATE (bool)
 
 INSTANTIATE (int8_t)
 
 INSTANTIATE (int16_t)
 
 INSTANTIATE (int32_t)
 
 INSTANTIATE (int64_t)
 
 INSTANTIATE (uint8_t)
 
 INSTANTIATE (uint16_t)
 
 INSTANTIATE (uint32_t)
 
 INSTANTIATE (uint64_t)
 
 INSTANTIATE (float)
 
 INSTANTIATE (double)
 

Typedef Documentation

typedef std::vector<VkPipelineColorBlendAttachmentState> talvos::BlendAttachmentStateList

A list of pipeline color blend attachment states.

Definition at line 32 of file GraphicsPipeline.h.

typedef Plugin*(* talvos::CreatePluginFunc)(const Device *)

Definition at line 42 of file Device.cpp.

typedef std::map<std::pair<uint32_t, uint32_t>, BindingInfo> talvos::DescriptorSet

Mapping from a binding and array element index to an address in memory.

Definition at line 34 of file PipelineContext.h.

typedef std::map<uint32_t, talvos::DescriptorSet> talvos::DescriptorSetMap

Mapping from set numbers to descriptor sets.

Definition at line 37 of file PipelineContext.h.

typedef void(* talvos::DestroyPluginFunc)(Plugin *)

Definition at line 43 of file Device.cpp.

typedef std::map<uint32_t, Object> talvos::SpecConstantMap

Mapping from specialization constant ID to Object values.

Definition at line 24 of file PipelineStage.h.

typedef std::vector<std::pair<const Type *, std::map<uint32_t, uint32_t> > > talvos::StructElementTypeList

A list of types used for structure members.

The second value for each entry is a map of decorations for the member.

Definition at line 22 of file Type.h.

typedef std::vector< const Variable * > talvos::VariableList

A list of module scope variables.

Definition at line 19 of file EntryPoint.h.

typedef std::vector<VkVertexInputAttributeDescription> talvos::VertexAttributeDescriptionList

A list of vertex attribute descriptions.

Definition at line 20 of file GraphicsPipeline.h.

typedef std::vector<VkVertexInputBindingDescription> talvos::VertexBindingDescriptionList

A list of vertex binding descriptions.

Definition at line 28 of file GraphicsPipeline.h.

typedef std::map<uint32_t, uint64_t> talvos::VertexBindingMap

Mapping from binding indexes to device memory addresses for vertex buffers.

Definition at line 21 of file PipelineContext.h.

Enumeration Type Documentation

enum talvos::MemoryScope
strong

Describes the scope of a memory instance.

Enumerator
Device 
Workgroup 
Invocation 

Definition at line 23 of file Memory.h.

Function Documentation

void talvos::blendTexel ( Image::Texel &  NewTexel,
const Image::Texel &  OldTexel,
const VkPipelineColorBlendAttachmentState &  Blend,
const std::array< float, 4 > &  BlendConstants 
)

Definition at line 591 of file PipelineExecutor.cpp.

bool talvos::checkEnv ( const char *  Name,
bool  Default 
)

Returns true if the environment variable Name is set to 1, false for 0, or Default if it is not set.

Definition at line 16 of file Utils.cpp.

uint32_t talvos::getElementSize ( VkFormat  Format)

Returns the size in bytes for each element of an image with type Format.

Definition at line 651 of file Image.cpp.

unsigned long talvos::getEnvUInt ( const char *  Name,
unsigned  Default 
)

Returns the integer value for the environment variable Name, or Default if it is not set.

Definition at line 33 of file Utils.cpp.

spv_result_t talvos::HandleHeader ( void *  user_data,
spv_endianness_t  endian,
uint32_t  ,
uint32_t  version,
uint32_t  generator,
uint32_t  id_bound,
uint32_t  schema 
)

Callback for SPIRV-Tools parsing a SPIR-V header.

Definition at line 677 of file Module.cpp.

spv_result_t talvos::HandleInstruction ( void *  user_data,
const spv_parsed_instruction_t *  parsed_instruction 
)

Callback for SPIRV-Tools parsing a SPIR-V instruction.

Definition at line 688 of file Module.cpp.

bool talvos::hasAlphaChannel ( VkFormat  Format)

Returns true if Format includes an alpha channel.

Definition at line 889 of file Image.cpp.

talvos::INSTANTIATE ( bool  )
talvos::INSTANTIATE ( int8_t  )
talvos::INSTANTIATE ( int16_t  )
talvos::INSTANTIATE ( int32_t  )
talvos::INSTANTIATE ( int64_t  )
talvos::INSTANTIATE ( uint8_t  )
talvos::INSTANTIATE ( uint16_t  )
talvos::INSTANTIATE ( uint32_t  )
talvos::INSTANTIATE ( uint64_t  )
talvos::INSTANTIATE ( float  )
talvos::INSTANTIATE ( double  )
void talvos::interpolate ( Object &  Output,
const Type *  Ty,
size_t  Offset,
const Object &  FA,
const Object &  FB,
const Object &  FC,
float  AW,
float  BW,
float  CW,
float  InvW,
float  a,
float  b,
float  c,
bool  Flat,
bool  Perspective 
)

Recursively populate a fragment shader input variable by interpolating between the vertex shader output variables in a triangle.

Parameters
OutputThe object being populated.
TyThe current type.
OffsetThe current byte offset within the object.
FA,FB,FCThe vertex shader output variables.
AW,BW,CWThe clip w coordinates of the vertices.
InvWThe inverse of the interpolated clip w coordinate.
a,b,cThe barycentric coordinates of the fragment.
FlatTrue to signal flat shading.
PerspectiveTrue to signal perspective-correct interpolation.

Definition at line 517 of file PipelineExecutor.cpp.

template<typename T >
void talvos::loadNormalizedVertexInput ( Object &  Obj,
VkFormat  Format,
const Memory &  Mem,
uint64_t  Address 
)

Definition at line 1604 of file PipelineExecutor.cpp.

std::ostream& talvos::operator<< ( std::ostream &  Stream,
const Dim3 &  D 
)

Produces the output "(X,Y,Z)".

Definition at line 16 of file Dim3.cpp.

std::ostream& talvos::operator<< ( std::ostream &  Stream,
const Type *  Ty 
)

Converts the type to a human readable format.

Definition at line 82 of file Type.cpp.

std::ostream& talvos::operator<< ( std::ostream &  Stream,
const Object &  O 
)

Converts the value of this object to a human readable format.

Definition at line 283 of file Object.cpp.

void talvos::print ( std::ostream &  Stream,
uint8_t *  Data,
const Type *  Ty 
)

Recursively print typed data to a stream.

Used by Object::operator<<().

Definition at line 196 of file Object.cpp.

float talvos::XDevToFB ( float  Xd,
VkViewport  Viewport 
)

Definition at line 568 of file PipelineExecutor.cpp.

float talvos::XFBToDev ( float  Xfb,
VkViewport  Viewport 
)

Definition at line 573 of file PipelineExecutor.cpp.

float talvos::YDevToFB ( float  Yd,
VkViewport  Viewport 
)

Definition at line 579 of file PipelineExecutor.cpp.

float talvos::YFBToDev ( float  Yfb,
VkViewport  Viewport 
)

Definition at line 584 of file PipelineExecutor.cpp.