MCPcopy Create free account
hub / github.com/NVIDIA-RTX/Donut / SetPushConstants

Method SetPushConstants

src/render/ForwardShadingPass.cpp:584–607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

582}
583
584void ForwardShadingPass::SetPushConstants(
585 donut::render::GeometryPassContext& abstractContext,
586 nvrhi::ICommandList* commandList,
587 nvrhi::GraphicsState& state,
588 nvrhi::DrawArguments& args)
589{
590 if (m_UseInputAssembler)
591 return;
592
593 auto& context = static_cast<Context&>(abstractContext);
594
595 ForwardPushConstants constants;
596 constants.startInstanceLocation = args.startInstanceLocation;
597 constants.startVertexLocation = args.startVertexLocation;
598 constants.positionOffset = context.positionOffset;
599 constants.texCoordOffset = context.texCoordOffset;
600 constants.normalOffset = context.normalOffset;
601 constants.tangentOffset = context.tangentOffset;
602
603 commandList->setPushConstants(&constants, sizeof(constants));
604
605 args.startInstanceLocation = 0;
606 args.startVertexLocation = 0;
607}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected