Why is GPU branching slow?

Started by
11 comments, last by Kylotan 17 years, 4 months ago
I'm not really sure about the old vertex processors (the new ones are more similiar to pixel processors). But yes, I think you can. IIRC, given a batch of pixels, the ones that don't follow the same path (the guessed one I think) don't save the results (but they execute the same instructions) and are saved for a later re-execution given the new path (I'm not sure how smart the control is, but I wouldn't be suprised if on older hardware the same batch would be sent for execution, even if some pixels are done). Hope this helps,

JVFF
ThanQ, JVFF (Janito Vaqueiro Ferreira Filho)
Advertisement
It does help. Thanks again.
It's worth bearing in mind that CPU branching is slow, too! It's just that CPUs, being general purpose devices, have had a lot more investment in alleviating this problem, in terms of predicting which branch is going to be taken and so on. With a GPU, it's much more of a specialised and linear device, so these optimisations are harder to perform while keeping costs down and performance up.

This topic is closed to new replies.

Advertisement