-
Bug
-
Resolution: Fixed
-
P3
-
internal
-
x86_64
-
os_x
MTLRenderer_FillSpans method in MTLRenderer.m gets invoked for variety of 2D primitive draw and fill operations - especially with HiDPI.
Span count and span data is passed to this method.
It draws each span as a quad using MTLRenderCommandEncoder::drawPrimitives.
There is 1:1 mapping between a span and MTLRenderCommandEncoder::drawPrimitives call.
Usually, for filled 2d primitives or stroked 2d primitives - the spancount is high. It results in multiple MTLRenderCommandEncoder::drawPrimitives calls.
It is observed that this slows down the rendering of these primitives.
Solution :
We can reduce the number of draw calls by buffering data and issuing one draw call when the buffer is full. Experimentation has shown good results for rendering of primitives that uses this method.
Span count and span data is passed to this method.
It draws each span as a quad using MTLRenderCommandEncoder::drawPrimitives.
There is 1:1 mapping between a span and MTLRenderCommandEncoder::drawPrimitives call.
Usually, for filled 2d primitives or stroked 2d primitives - the spancount is high. It results in multiple MTLRenderCommandEncoder::drawPrimitives calls.
It is observed that this slows down the rendering of these primitives.
Solution :
We can reduce the number of draw calls by buffering data and issuing one draw call when the buffer is full. Experimentation has shown good results for rendering of primitives that uses this method.
- relates to
-
JDK-8225175 Evaluate RenderQueue Vs non-RenderQueue Design architecture for Metal Rendering Pipeline implementation
- Closed