RFR: 8288948: Few J2DBench tests indicate lower primitive drawing performance with metal rendering pipeline [v2]

Sergey Bylokhov serb at openjdk.org
Thu Jul 14 17:00:12 UTC 2022


On Wed, 13 Jul 2022 16:54:40 GMT, Ajit Ghaisas <aghaisas at openjdk.org> wrote:

>>> We cannot use MTLPrimitiveTypeLineStrip if we want to batch the subsequent draw calls as it draws an unwanted line between previous rectangle and current rectangle.
>> 
>> Even if the alpha will be transparent? Just curious.
>
> Yes, there will be a transparent line between previous rectangle and current rectangle.
> This PR introduces batching of vertices of successive draw calls of the same primitive. If we keep on adding vertices to a common buffer and finally encode draw operation using MTLPrimitiveTypeLineStrip, all those vertices will be connected. If color is changed in between these successive draw calls, we end the current vertex batch and start a new one.

But what about the usage of MTLPrimitiveTypeLineStrip and the transparent color to hide the "unwanted line between previous rectangle and current rectangle"? OR it is not possible to draw the lines using different colors in one step?

-------------

PR: https://git.openjdk.org/jdk/pull/9245



More information about the client-libs-dev mailing list