| 247 | } |
| 248 | |
| 249 | VdfMask::Bits |
| 250 | VdfSpeculationNode::_ComputeInputDependencyMask( |
| 251 | const VdfMaskedOutput &maskedOutput, |
| 252 | const VdfConnection &inputConnection) const |
| 253 | { |
| 254 | // Get the input targeted by inputConnection, and find the corresponding |
| 255 | // output. |
| 256 | const VdfOutput *correspondingOutput = |
| 257 | GetOutput(inputConnection.GetTargetInput().GetName()); |
| 258 | const VdfOutput *output = maskedOutput.GetOutput(); |
| 259 | |
| 260 | // If we're talking about the corresponding output, the dependencies are |
| 261 | // correlated. |
| 262 | if (TF_VERIFY(correspondingOutput) && |
| 263 | TF_VERIFY(output) && |
| 264 | output == correspondingOutput) { |
| 265 | return |
| 266 | inputConnection.GetMask().GetBits() & |
| 267 | maskedOutput.GetMask().GetBits(); |
| 268 | } |
| 269 | |
| 270 | // Otherwise, there's no dependency, so return an empty mask. |
| 271 | return VdfMask::Bits(); |
| 272 | } |
| 273 | |
| 274 | PXR_NAMESPACE_CLOSE_SCOPE |