JDK-8330761 : Avoid createing new RenderEncoder in clearRtt
  • Type: Sub-task
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: internal
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-04-22
  • Updated: 2024-05-23
  • Resolved: 2024-05-20
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
In the method MetalContext.clearRtt,
- For clearing the whole rtt we depend on LoadAction of RenderEncoder.
- That requires to end the ongoig Encoder and create a new RenderEcoder
- The LoadAction itself is good idea to clear but ending the encoder here does not allow to merge any other encoders that qualify merge criteria.

We tried a change for this,
- It works correctly on intel mac, and shows a gain of 2-3 FPS in blend samples
- But, It shows rendering artifacts on M1, which must be a scenario of stricter state management on M1 than intel mac.



Comments
In RenderPerf Test, the following blend samples show a gain of ~4 FPS i.e. FPS increases to ~12 from ~8. CircleBlendDarken CircleBlendAdd CircleBlendMultiply Changeset: 85ad4e52 Author: Ambarish Rapte <arapte@openjdk.org> Date: 2024-05-21 00:44:54 +0000 URL: https://git.openjdk.org/jfx-sandbox/commit/85ad4e52efa64f5a28b9689aa59972597198f551
20-05-2024