MCPcopy Create free account
hub / github.com/PixarAnimationStudios/OpenUSD / _AddUniformBufferElement

Function _AddUniformBufferElement

pxr/imaging/hdSt/codeGen.cpp:1556–1575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1554}
1555
1556static void
1557_AddUniformBufferElement(
1558 HioGlslfxResourceLayout::ElementVector *elements,
1559 TfToken const &name,
1560 TfToken const &dataType,
1561 int location,
1562 int arraySize = 0)
1563{
1564 TfToken const arraySizeArg =
1565 ((arraySize > 0) ? TfToken(std::to_string(arraySize)) : TfToken());
1566
1567 elements->emplace_back(
1568 HioGlslfxResourceLayout::InOut::NONE,
1569 HioGlslfxResourceLayout::Kind::UNIFORM_BLOCK,
1570 dataType, name, arraySizeArg);
1571 elements->back().members.emplace_back(dataType, name);
1572 if (location >= 0) {
1573 elements->back().location = static_cast<uint32_t>(location);
1574 }
1575}
1576
1577static void
1578_AddBufferElement(

Callers 1

_EmitDeclarationFunction · 0.85

Calls 4

TfTokenClass · 0.50
to_stringFunction · 0.50
emplace_backMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected