24#ifndef PXR_IMAGING_HIO_GLSLFX_RESOURCE_LAYOUT_H
25#define PXR_IMAGING_HIO_GLSLFX_RESOURCE_LAYOUT_H
29#include "pxr/imaging/hio/types.h"
36PXR_NAMESPACE_OPEN_SCOPE
39#define HIO_GLSLFX_RESOURCE_LAYOUT_TOKENS \
44 ((inBlock, "in block")) \
45 ((outBlock, "out block")) \
46 ((inValueArray, "in array")) \
47 ((outValueArray, "out array")) \
48 ((inBlockArray, "in block array")) \
49 ((outBlockArray, "out block array")) \
50 ((uniformBlock, "uniform block")) \
51 ((bufferReadOnly, "buffer readOnly")) \
52 ((bufferReadWrite, "buffer readWrite")) \
61 HIO_GLSLFX_RESOURCE_LAYOUT_TOKENS);
106 UNIFORM_BLOCK_CONSTANT_PARAMS,
119 , arraySize(arraySize)
126 using MemberVector = std::vector<Member>;
131 Kind kind = Kind::NONE,
132 TfToken dataType = HioGlslfxResourceLayoutTokens->unknown,
133 TfToken name = HioGlslfxResourceLayoutTokens->unknown,
141 , qualifiers(qualifiers)
142 , arraySize(arraySize)
154 MemberVector members;
156 using ElementVector = std::vector<Element>;
170 HioFormat format = HioFormatFloat32Vec4,
175 , bindingIndex(bindingIndex)
177 , textureType(textureType)
178 , arraySize(arraySize)
187 using TextureElementVector = std::vector<TextureElement>;
196 ElementVector *result,
202PXR_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...