Skip to content

Commit

Permalink
[hdx] Task controller: skip creating unsupported AOVs.
Browse files Browse the repository at this point in the history
For AOVs which the render delegate specifies as HdFormatInvalid, skip adding them to the task graph, since none of the downstream code can do much with a buffer of invalid type.

Fixes #1215

(Internal change: 2137615)
  • Loading branch information
tcauchois authored and pixar-oss committed Jan 21, 2021
1 parent 7151d38 commit 4a160b0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions pxr/imaging/hdx/taskController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -910,10 +910,17 @@ HdxTaskController::SetRenderOutputs(TfTokenVector const& outputs)

// Get default AOV descriptors from the render delegate.
HdAovDescriptorList outputDescs;
outputDescs.resize(localOutputs.size());
for (size_t i = 0; i < localOutputs.size(); ++i) {
outputDescs[i] = GetRenderIndex()->GetRenderDelegate()->
GetDefaultAovDescriptor(localOutputs[i]);
for (auto it = localOutputs.begin(); it != localOutputs.end();) {
HdAovDescriptor desc = GetRenderIndex()->GetRenderDelegate()->
GetDefaultAovDescriptor(*it);
if (desc.format == HdFormatInvalid) {
// The backend doesn't support this AOV, so skip it.
it = localOutputs.erase(it);
} else {
// Otherwise, stash the desc and move forward.
outputDescs.push_back(desc);
++it;
}
}

// Add the new renderbuffers. _GetAovPath returns ids of the form
Expand Down

0 comments on commit 4a160b0

Please sign in to comment.