Skip to content

Draft: panfrost: flush batch when there's too many primitives

Erik Faye-Lund requested to merge kusma/mesa:pan-max-primitive-count into main

This one is kinda question, and I'm probably barking up the wrong tree here by accident. But I thought I'd send to get some input here.

I've been debugging an issue where very high primitive counts leads to no rendering (using both fairly large instance counts and primitive counts at the same time, as well as doing multiple draws), and I checked the HW docs and realized we need to cap the amount of primitives we draw per tiler job.

However, the implementation is kinda wrong, because we should really check if we will overflow the primitive-count rather than if we already did. At the same time, I realized that we don't get the vertex-count tracking we're already doing for XFB right when it comes to instances (I think), and I thought I'd fix that... and then the problems started to look a bit alike.

And then finally comes the last patch, that shows us that this isn't the real issue I'm dealing with anyway, because we need a much lower limit than the HW requires. It could be a timeout that I'm just not seeing for some reason, though. We do limit draw-counts quite a bit earlier than we need to for that reason. Dunno, really...

This does fix my issue... but it seems like I'm on the wrong track, and the primitive count is a red herring, TBH. Thoughts?

Merge request reports