HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HioGlslfxResourceLayout Class Reference

#include <glslfxResourceLayout.h>

Classes

struct  Element
 Specifies a resource element. More...
 
struct  Member
 Specifies a member of an aggregate resource element. More...
 
struct  TextureElement
 Specifies a texture element. More...
 

Public Types

enum  InOut { InOut::NONE, InOut::STAGE_IN, InOut::STAGE_OUT }
 
enum  Kind {
  Kind::NONE, Kind::VALUE, Kind::BLOCK, Kind::QUALIFIER,
  Kind::UNIFORM_VALUE, Kind::UNIFORM_BLOCK, Kind::UNIFORM_BLOCK_CONSTANT_PARAMS, Kind::BUFFER_READ_ONLY,
  Kind::BUFFER_READ_WRITE
}
 Specifies the kind of resource element. More...
 
enum  TextureType { TextureType::TEXTURE, TextureType::SHADOW_TEXTURE, TextureType::ARRAY_TEXTURE }
 Specifies the type of a texture element. More...
 
using MemberVector = std::vector< Member >
 
using ElementVector = std::vector< Element >
 
using TextureElementVector = std::vector< TextureElement >
 

Public Member Functions

 HioGlslfxResourceLayout ()
 
 ~HioGlslfxResourceLayout ()
 

Static Public Member Functions

static HIO_API void ParseLayout (ElementVector *result, TfToken const &shaderStage, VtDictionary const &layoutDict)
 

Detailed Description

The resource layout for stages in a shader pipeline.

The main geometric shader pipelines for meshes, curves, points, volumes, as well as compute shaders for subdivision refinement, etc. are expressed as GLSL source code and aspects of the main shader pipeline that are generated at runtime also are expressed as GLSL source code.

This class provides an intermediate representation for shader resources that are needed to provide access to external data like buffers and textures and also interstage data like input and output variables and input and output interface blocks.

A method is provided to parse resource data from HioGlslfx resource layout dictionaries so that resource layout definitions can continue to be authored alongside related GLSL shader source.

The dictionary layouts have been designed to match the concepts and syntax used by GLSL.

Definition at line 80 of file glslfxResourceLayout.h.

Member Typedef Documentation

Definition at line 148 of file glslfxResourceLayout.h.

Definition at line 118 of file glslfxResourceLayout.h.

Member Enumeration Documentation

Specifies whether a resource element is a shader input, a shader output (i.e. an input or output variable or input or output interface block), or neither (i.e. a buffer or texture).

Enumerator
NONE 
STAGE_IN 
STAGE_OUT 

Definition at line 86 of file glslfxResourceLayout.h.

Specifies the kind of resource element.

Enumerator
NONE 
VALUE 
BLOCK 
QUALIFIER 
UNIFORM_VALUE 
UNIFORM_BLOCK 
UNIFORM_BLOCK_CONSTANT_PARAMS 
BUFFER_READ_ONLY 
BUFFER_READ_WRITE 

Definition at line 93 of file glslfxResourceLayout.h.

Specifies the type of a texture element.

Enumerator
TEXTURE 
SHADOW_TEXTURE 
ARRAY_TEXTURE 

Definition at line 151 of file glslfxResourceLayout.h.

Constructor & Destructor Documentation

HioGlslfxResourceLayout::HioGlslfxResourceLayout ( )
HioGlslfxResourceLayout::~HioGlslfxResourceLayout ( )

Member Function Documentation

static HIO_API void HioGlslfxResourceLayout::ParseLayout ( ElementVector result,
TfToken const &  shaderStage,
VtDictionary const &  layoutDict 
)
static

Parses GLSLFX resource layout elements from the specified layoutDict and appends the parsed elements to result.


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