JDK-8355812 : Pass vertex and color buffers directly to vertex shader
  • Type: Sub-task
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: internal
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2025-04-29
  • Updated: 2025-04-29
  • Resolved: 2025-04-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
internalFixed
Description
Prism sends two buffers when rendering the 2D shapes.
one buffer with vertex position, texture coordinates and another with color data.
Currently we collate these two separate buffers into a single buffer in MetalContext.fillVB native method. 
Before JDK-8341599, we passed 6 vertices per quad, But after JDK-8341599 we pass the buffers as is, but only by collating them into one. This can be avoided by passing the buffers directly to shader. 
Comments
This change specifically improves the tests which pass more vertex data for drawing shapes. For instance on M2, this change improves FPS of 6 tests significantly to more than ES2 Circle: 24.7 to 26 RadGradCircle: 17.3 to 19.5 WhiteText: 21.6 to 25.4 ColorText: 21.3 to 25.3 LargeText: 18 to 20.8 LargeColorText: 18 to 20.7 -------------------------------------------- Changeset: 60c2d746 Branch: metal Author: Ambarish Rapte <arapte@openjdk.org> Date: 2025-04-29 11:47:42 +0000 URL: https://git.openjdk.org/jfx-sandbox/commit/60c2d7464fe96efe19fe531c668f0662fff7fb3a
29-04-2025