Open Bug 1805913 Opened 2 years ago Updated 3 months ago

Make it possible to render arbitrary types of geometry

Categories

(Core :: Graphics: WebRender, task, P3)

task

Tracking

()

People

(Reporter: nical, Unassigned)

References

(Blocks 1 open bug)

Details

WebRender can render two types of targets:

  • Non-picture render tasks where primitives never overlap so there is no dedicated batching algorithm and adding arbitrary primitives is fairly simple.
  • Picture tasks which go through the code in batch.rs. Anything that is rendered there needs to integrate with the batching code which is currently specialized for instanced quads.

This bug is about making possible to render more than instanced quads picture tasks (not necessarily make that nice).

We can get there by changing PrimitiveBatch such that we can push arbitrary data in the vertex buffer (basically pushing into a buffer of bytes instead of PrimitiveInstanceData).

On the renderer side draw_alpha_batch_container or draw_instanced_batch would be extended to produce instanced or non-instanced draw calls depending on information stored in the batch.

Blocks: wr-todos
You need to log in before you can comment on or make changes to this bug.