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,
106 , arraySize(arraySize)
113 using MemberVector = std::vector<Member>;
118 Kind kind = Kind::NONE,
119 TfToken dataType = HioGlslfxResourceLayoutTokens->unknown,
120 TfToken name = HioGlslfxResourceLayoutTokens->unknown,
129 , qualifiers(qualifiers)
130 , arraySize(arraySize)
133 , stageVisibility(stageVisibility)
143 MemberVector members;
146 using ElementVector = std::vector<Element>;
161 HioFormat format = HioFormatFloat32Vec4,
166 , bindingIndex(bindingIndex)
168 , textureType(textureType)
169 , arraySize(arraySize)
178 using TextureElementVector = std::vector<TextureElement>;
187 ElementVector *result,
193PXR_NAMESPACE_CLOSE_SCOPE
The resource layout for stages in a shader pipeline.
uint32_t ShaderStage
Describes the stage a shader function operates in.
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...