JDK-8309099 : Blend modes are not changing in metal pipeline
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: internal
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2023-05-30
  • Updated: 2024-07-06
  • Resolved: 2023-06-21
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
internalResolved
Related Reports
Duplicate :  
Description
Blend mode changes are not reflecting on screen when application is ran on metal pipeline. The objects are getting rendered with default blend modes.
This issue was observed while running the RenderPerf test on metal pipeline.
This issue can be reproduced by running following 3 tests:
-CircleBlendMultiply
-CircleBlendAdd
-CircleBlendDarken

Screenshot of the CircleBlendMultiply test on both ES2 and metal pipeline is attached for reference.

Comments
This is fixed in latest code with the fix for supporting canvas JDK-8305648. Below is the part of that change which fixes this issue: diff --git a/modules/javafx.graphics/src/main/java/com/sun/prism/mtl/MTLRTTexture.java b/modules/javafx.graphics/src/main/java/com/sun/prism/mtl/MTLRTTexture.java index 2c83c1d437..ed4232cb94 100644 --- a/modules/javafx.graphics/src/main/java/com/sun/prism/mtl/MTLRTTexture.java +++ b/modules/javafx.graphics/src/main/java/com/sun/prism/mtl/MTLRTTexture.java @@ -30,7 +30,7 @@ import com.sun.prism.*; import java.nio.Buffer; -public class MTLRTTexture extends MTLTexture<MTLTextureData> implements RTTexture { +public class MTLRTTexture extends MTLTexture<MTLTextureData> implements RTTexture, ReadbackRenderTarget { private int[] pixels; private int rttWidth; private int rttHeight; @@ -90,6 +90,11 @@ public class MTLRTTexture extends MTLTexture<MTLTextureData> implements RTTextur return nTexPtr; } + @Override + public Texture getBackBuffer() { + return this; + } + @Override public void setContentWidth(int contentWidth) { // TODO: MTL: Complete implementation or remove to use super method
21-06-2023