Closed Bug 1536673 Opened 6 years ago Closed 2 months ago

Implement webgl draft ext WEBGL_multi_draw

Categories

(Core :: Graphics: CanvasWebGL, enhancement, P3)

enhancement

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jgilbert, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: dev-doc-needed, Whiteboard: gfx-noted)

Assignee: jgilbert → nobody
Priority: P1 → P2

Are there any plan or news on this?
We're planning to implement a web project that will really benefit from multi_draw and it would be bad to have a better implementation only available on chrome and chromium based browsers.

How's the perf if you use non-multidraw in Firefox? Chrome is generally much, much more sensitive to many (single-)draw calls than Firefox.

We want to render complex tree like cad structures with multiple parts, so even instancing could help.
We defined 3 strategies

  1. One draw call for part
  2. Create on big triangle blob and draw that using a texture for materials
  3. MultiDraw

We would like to not use the 2nd solution as the main overhead is too much.
Using the other two strategies, with our sample datasets, we get
Chrome + One Draw Call For Part = 50ms render time (20 fps)
Chrome + MultiDraw = ~1ms render time (capped at 30fps)

Firefox + One Draw Call For Part = 70ms render time (~15 fps)
Firefox + MultiDraw = Not Available

And we don't have control on the input scene to render so we can't do magic optimizations.
In this situation Chrome is really offering a nice user expirience that we're not able to reproduce in Firefox for now but we want to!

We Three.js are thinking of using WEBGL_multi_draw

https://github.com/mrdoob/three.js/issues/22376

It will be really nice if Firefox supports the WEBGL_multi_draw extension.

Is it planned ? Thanks.

We have to prototype it to see if the performance is worth it.

Specifically, even better than implementing this would be getting draw call performance good enough that it's not needed.

Chrome is a little different than Firefox here, as (historically?) their js<->cpp bindings code is slower, so many-draw-calls will much more often slower for them than one multi-draw call.

Severity: normal → S3

I don't think this is how we should try to optimize this case.
Our bindings code in this case doesn't really show up in profiles, so the only benefit here would be optimization opportunities around not re-checking come kinds of validation each call. That validation is decently cached, so this isn't probably a huge win anyways.
Effectively, we should be optimizing for this use-case, but we don't think we need an extension to do so.

Blocks: webgl-exts
Status: NEW → RESOLVED
Closed: 2 months ago
Priority: P2 → P3
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.