coalesce draw calls with same texture/clip#766
Conversation
|
@foxnne When you get a chance can you see if this helps your performance issues with Pixi and Graphl? |
|
I should have said - I added a checkbox "Log Stats" to the Debug Window that outputs the number of backend draw calls each frame. Unsure how useful this specifically is. I think it will be useful to keep track of various stats and expose them through the debug window, so this is an initial step in that direction. |
|
It seemed to improve the performance quite a bit, but I'm still getting sub 60 in some conditions. I think that's my fault though, as the little bubbles I draw for sprites are still all using individual draw calls, and a lot of them each. So I need to rewrite my code to combine as many things as I can. I didn't have a chance to test Graphl yet, but I think I'd see improvements but we will still pursue batching on our own? |
|
This is interesting, I'm not sure if it's a bug or just me misunderstanding, but it seems like the logging for the draw calls doesn't really change when I enable or disable batching. Sometimes I have 1500 draw calls and sometimes 200 in the same scene, without touching the batching button. Is the draw calls an average? At any case, it doesn't seem to remedy my Pixi issue with the cell bubbles, but I need to test Graphl. |
No. Hmm this is suspicious, need to figure this out. I will try with Pixi. When you run the demo do you see the draw count being affected by batching? |
|
I do see it working now, I think I needed to clear my caches and that what I was observing before was some cache issues. It still seems that my code is producing a lot of draw calls, I believe its the explicit calls to |
|
I also seem to be getting the below error with pixi only on this branch, but I cant observe any issues with whats being drawn. Is that perhaps that I have animations that could start at 0? |
seen in #766 We have protections against trying to rasterize an icon with zero height. But if an icon has a ratio of like 5x10 (so tall), then if we ask to render it at 1px tall, internally we see a width if 0.5. We were truncating that to 0 and then failing the rasterization. Now we ensure the width is at least 1 for rasterization.
Sorry I dropped this on the floor. We had code that would fail if a tall icon was rendered at a small height (like 1px tall, so the width was < 1px). I've pushed a fix for this to main, but I'm still unsure why you only saw it on this branch. |
|
@foxnne Can you help me get back up to speed with this? I'm unsure where we stand:
|

Fixes #637
While running the demo, this generally halves the number of backend.drawClippedTriangles calls.
Need some feedback about whether this actually addresses the performance issues.