7#ifndef PXR_IMAGING_HIO_GLSLFX_RESOURCE_LAYOUT_H
8#define PXR_IMAGING_HIO_GLSLFX_RESOURCE_LAYOUT_H
12#include "pxr/imaging/hio/types.h"
19PXR_NAMESPACE_OPEN_SCOPE
22#define HIO_GLSLFX_RESOURCE_LAYOUT_TOKENS \
27 ((inBlock, "in block")) \
28 ((outBlock, "out block")) \
29 ((inValueArray, "in array")) \
30 ((outValueArray, "out array")) \
31 ((inBlockArray, "in block array")) \
32 ((outBlockArray, "out block array")) \
33 ((uniformBlock, "uniform block")) \
34 ((bufferReadOnly, "buffer readOnly")) \
35 ((bufferReadWrite, "buffer readWrite")) \
44 HIO_GLSLFX_RESOURCE_LAYOUT_TOKENS);
89 UNIFORM_BLOCK_CONSTANT_PARAMS,
102 , arraySize(arraySize)
109 using MemberVector = std::vector<Member>;
114 Kind kind = Kind::NONE,
115 TfToken dataType = HioGlslfxResourceLayoutTokens->unknown,
116 TfToken name = HioGlslfxResourceLayoutTokens->unknown,
124 , qualifiers(qualifiers)
125 , arraySize(arraySize)
137 MemberVector members;
139 using ElementVector = std::vector<Element>;
154 HioFormat format = HioFormatFloat32Vec4,
159 , bindingIndex(bindingIndex)
161 , textureType(textureType)
162 , arraySize(arraySize)
171 using TextureElementVector = std::vector<TextureElement>;
180 ElementVector *result,
186PXR_NAMESPACE_CLOSE_SCOPE
The resource layout for stages in a shader pipeline.
TextureType
Specifies the type of a texture element.
InOut
Specifies whether a resource element is a shader input, a shader output (i.e.
Kind
Specifies the kind of resource element.
static HIO_API void ParseLayout(ElementVector *result, TfToken const &shaderStage, VtDictionary const &layoutDict)
Parses GLSLFX resource layout elements from the specified layoutDict and appends the parsed elements ...
Token for efficient comparison, assignment, and hashing of known strings.
A map with string keys and VtValue values.
This file defines some macros that are useful for declaring and using static TfTokens.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Specifies a resource element.
Specifies a member of an aggregate resource element.
Specifies a texture element.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...