Hi, I was wondering what the performance difference is between having multiple pipelines to implement several steps of a rendering algorithm (render passes) vs having less pipelines (maybe even 1 pipeline) implementing these steps sequentially within the same pipeline. I can imagine there being some redundant data between multiple pipelines requiring a bit extra memory, but is there an actual speed difference between the 2 approaches, e.g. how much drawback does the amount of optixLaunch
calls give?
Hi @Chupp4,
Your pipeline determines your total register count, and by extension, occupancy. The pipeline also contains information about your payload and its layout. This is one reason you might choose to take the extra effort to create multiple pipelines, because you might be able to reduce and/or optimize one of them more than the other, so you might be able to get it to run faster than if you put multiple render passes into a single pipeline. When you put multiple launch types into a single pipeline, the compiler will use the more conservative choice between all of them when it needs to figure out how to allocate registers (i.e., all passes in a single pipeline will consume the same number of registers from the hardware perspective, whether they actually use them or not).
Other considerations include whether you will compile these pipelines at different rates, and whether you want to link them when any of your render passes changes or recompiles. Having multiple pipelines lets you keep the compilation and link more separated in addition to any performance benefits you might find.
If all of your render passes use the same payload & layout, and approximately the same number of registers, then I don’t expect there is any performance advantage to having your passes in multiple pipelines or together in a single pipeline.
–
David.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.