Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL [v5]
On Mon, 5 Jul 2021 15:55:20 GMT, Alexey Ushakov wrote: >> Implemented blit via compute kernel > > Alexey Ushakov has updated the pull request incrementally with one additional > commit since the last revision: > > 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL > > Minor cleanup Moving this request to jdk18 - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL [v3]
On Mon, 5 Jul 2021 15:51:46 GMT, Alexey Ushakov wrote: >> The latest version of this PR re-introduces >> [JDK-8243547](https://bugs.openjdk.java.net/browse/JDK-8243547) > >> The latest version of this PR re-introduces >> [JDK-8243547](https://bugs.openjdk.java.net/browse/JDK-8243547) > > Fixed @avu Since we are past RDP2, lets close this JDK17 PR and open new jdk-dev(18) PR to continue the review. - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL [v5]
On Mon, 5 Jul 2021 15:55:20 GMT, Alexey Ushakov wrote: >> Implemented blit via compute kernel > > Alexey Ushakov has updated the pull request incrementally with one additional > commit since the last revision: > > 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL > > Minor cleanup I verified that the latest version does not re-introduce JDK-8243547. All automated test run is also green with this version. - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL [v5]
On Mon, 5 Jul 2021 15:55:20 GMT, Alexey Ushakov wrote: >> Implemented blit via compute kernel > > Alexey Ushakov has updated the pull request incrementally with one additional > commit since the last revision: > > 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL > > Minor cleanup src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java line 340: > 338: if (!isTranslucent) { > 339: contentView.setWindowLayerOpaque(true); > 340: } I think windowLayer should be always in sync with NSWindowOpaque state. And both should be changed together via setOpaque() method. The change above will call the "setWindowLayerOpaque" twice: - LWWindowPeer()->platformWindow.initialize()->contentView.setWindowLayerOpaque(true) - LWWindowPeer()->initializeImpl()->setOpaque()->contentView.setWindowLayerOpaque() - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL [v2]
On Mon, 28 Jun 2021 22:45:12 GMT, Sergey Bylokhov wrote: >> Alexey Ushakov has refreshed the contents of this pull request, and previous >> commits have been removed. The incremental views will show differences >> compared to the previous content of the PR. > > src/java.desktop/macosx/native/libawt_lwawt/awt/CWrapper.m line 349: > >> 347: if ([window.contentView.layer isKindOfClass:[CAMetalLayer >> class]]) { >> 348: [window.contentView.layer setOpaque:(BOOL)opaque]; >> 349: } > > This class "CWrapper" is intended to be a simple wrapper on top of cocoa > methods, the changed method above is expected to call the > "NSWindow#setOpaque" only. So you need to place "window.contentView.layer > setOpaque" in some other place(native or java). Done - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL [v3]
On Mon, 5 Jul 2021 05:54:07 GMT, Ajit Ghaisas wrote: > The latest version of this PR re-introduces > [JDK-8243547](https://bugs.openjdk.java.net/browse/JDK-8243547) Fixed - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL [v4]
On Mon, 5 Jul 2021 15:41:34 GMT, Alexey Ushakov wrote: >> Implemented blit via compute kernel > > Alexey Ushakov has updated the pull request incrementally with one additional > commit since the last revision: > > 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL > > Keep layer translucent for translucent windows > don't we need to do something like [mtlLayer setOpaque:(opaque == JNI_TRUE)]? Done - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL [v5]
> Implemented blit via compute kernel Alexey Ushakov has updated the pull request incrementally with one additional commit since the last revision: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL Minor cleanup - Changes: - all: https://git.openjdk.java.net/jdk17/pull/62/files - new: https://git.openjdk.java.net/jdk17/pull/62/files/e61914d3..cb4cf04c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk17=62=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk17=62=03-04 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk17/pull/62.diff Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/62/head:pull/62 PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL [v4]
> Implemented blit via compute kernel Alexey Ushakov has updated the pull request incrementally with one additional commit since the last revision: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL Keep layer translucent for translucent windows - Changes: - all: https://git.openjdk.java.net/jdk17/pull/62/files - new: https://git.openjdk.java.net/jdk17/pull/62/files/361407b1..e61914d3 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk17=62=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk17=62=02-03 Stats: 5 lines in 2 files changed: 4 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk17/pull/62.diff Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/62/head:pull/62 PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL [v3]
On Mon, 5 Jul 2021 05:54:07 GMT, Ajit Ghaisas wrote: > The latest version of this PR re-introduces JDK-8243547 rechecked with the previous version, still reproducible. - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL [v3]
On Fri, 2 Jul 2021 17:49:17 GMT, Alexey Ushakov wrote: >> Implemented blit via compute kernel > > Alexey Ushakov has refreshed the contents of this pull request, and previous > commits have been removed. The incremental views will show differences > compared to the previous content of the PR. The pull request contains one new > commit since the last revision: > > 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL > > Keep MTLLayer opacity in sync with window content view The latest version of this PR re-introduces [JDK-8243547](https://bugs.openjdk.java.net/browse/JDK-8243547) - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL [v3]
> Implemented blit via compute kernel Alexey Ushakov has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL Keep MTLLayer opacity in sync with window content view - Changes: - all: https://git.openjdk.java.net/jdk17/pull/62/files - new: https://git.openjdk.java.net/jdk17/pull/62/files/3eef431e..361407b1 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk17=62=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk17=62=01-02 Stats: 34 lines in 6 files changed: 28 ins; 5 del; 1 mod Patch: https://git.openjdk.java.net/jdk17/pull/62.diff Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/62/head:pull/62 PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL [v2]
On Wed, 23 Jun 2021 12:15:03 GMT, Alexey Ushakov wrote: >> Implemented blit via compute kernel > > Alexey Ushakov has refreshed the contents of this pull request, and previous > commits have been removed. The incremental views will show differences > compared to the previous content of the PR. The pull request contains one new > commit since the last revision: > > 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL > > Keep MTLLayer opacity in sync with window content view All test run is green with latest commit. - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL [v2]
On Wed, 23 Jun 2021 12:15:03 GMT, Alexey Ushakov wrote: >> Implemented blit via compute kernel > > Alexey Ushakov has refreshed the contents of this pull request, and previous > commits have been removed. The incremental views will show differences > compared to the previous content of the PR. The pull request contains one new > commit since the last revision: > > 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL > > Keep MTLLayer opacity in sync with window content view src/java.desktop/macosx/native/libawt_lwawt/awt/CWrapper.m line 349: > 347: if ([window.contentView.layer isKindOfClass:[CAMetalLayer > class]]) { > 348: [window.contentView.layer setOpaque:(BOOL)opaque]; > 349: } This class "CWrapper" is intended to be a simple wrapper on top of cocoa methods, the changed method above is expected to call the "NSWindow#setOpaque" only. So you need to place "window.contentView.layer setOpaque" in some other place(native or java). - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL [v2]
> Implemented blit via compute kernel Alexey Ushakov has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL Keep MTLLayer opacity in sync with window content view - Changes: - all: https://git.openjdk.java.net/jdk17/pull/62/files - new: https://git.openjdk.java.net/jdk17/pull/62/files/4d1b80ff..3eef431e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk17=62=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk17=62=00-01 Stats: 56 lines in 4 files changed: 4 ins; 50 del; 2 mod Patch: https://git.openjdk.java.net/jdk17/pull/62.diff Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/62/head:pull/62 PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
On Tue, 15 Jun 2021 16:57:00 GMT, Alexey Ushakov wrote: > Implemented blit via compute kernel Just found the more simple solution to this problem: we can still use old blit code and keep MTLLayer opacity property in sync with contentView of the window (CWraper.setOpaque). - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
On Wed, 16 Jun 2021 10:34:50 GMT, Alexey Ushakov wrote: >> src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLLayer.m line 159: >> >>> 157: [computeEncoder endEncoding]; >>> 158: [cb commit]; >>> 159: #endif >> >> This is better than changing the background color, but should be carefully >> checked. @jayathirthrao @aghaisas please take a look. >> Since this affects every blit to the window I suggest running a full test >> run. > > @jayathirthrao @aghaisas please let me know if I can push this change into > JDK17 repository @avu If all our automated tests are green but we still have some issues, then an additional automated test needs to be added. - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
On Tue, 15 Jun 2021 16:57:00 GMT, Alexey Ushakov wrote: > Implemented blit via compute kernel What I have observed with this patch is - It does not break all shaped or translucent windows - but, a manual JCK test does show the black background. - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
On Tue, 15 Jun 2021 16:57:00 GMT, Alexey Ushakov wrote: > Implemented blit via compute kernel With this patch shaped windows with translucent/color background are showing only black background. In manual JCK shaped window test also this difference in behaviour is seen. This behaviour difference can be checked using Ruler.java test case attached in https://bugs.openjdk.java.net/browse/JDK-8267963 - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
On Thu, 17 Jun 2021 07:06:24 GMT, Jayathirth D V wrote: >> Implemented blit via compute kernel > > src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLLayer.m line 136: > >> 134: NSUInteger w = computePipelineState.threadExecutionWidth; >> 135: >> 136: // Workaround for some OS/device bug reporting incorrect >> maxTotalThreadsPerThreadgroup > > @avu Do we know in which hardware we have this issue? Also do we have any > reference to Apple bug? > Also if we use thread group as 1 what is the performance impact in such > hardware? Forced maxTotalThreadsPerThreadgroup to 1 and tested in Intel SoC 2015 Macbook Pro, as expected i see almost ~50% reduction in FPS numbers in many use cases in RenderPerfTest. This final blit hits common operation and we would be able to make better decision whether this performance reduction is okay or not based on hardware in which we are seeing Apple bug. - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
On Wed, 16 Jun 2021 11:57:01 GMT, Jayathirth D V wrote: >> @jayathirthrao @aghaisas please let me know if I can push this change into >> JDK17 repository > > @avu i have given all test run. I will get back to you once it is done. Automated jtreg/JCK test run is green. - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
On Tue, 15 Jun 2021 16:57:00 GMT, Alexey Ushakov wrote: > Implemented blit via compute kernel src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLLayer.m line 136: > 134: NSUInteger w = computePipelineState.threadExecutionWidth; > 135: > 136: // Workaround for some OS/device bug reporting incorrect > maxTotalThreadsPerThreadgroup @avu Do we know in which hardware we have this issue? Also do we have any reference to Apple bug? Also if we use thread group as 1 what is the performance impact in such hardware? - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
On Wed, 16 Jun 2021 10:34:50 GMT, Alexey Ushakov wrote: >> src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLLayer.m line 159: >> >>> 157: [computeEncoder endEncoding]; >>> 158: [cb commit]; >>> 159: #endif >> >> This is better than changing the background color, but should be carefully >> checked. @jayathirthrao @aghaisas please take a look. >> Since this affects every blit to the window I suggest running a full test >> run. > > @jayathirthrao @aghaisas please let me know if I can push this change into > JDK17 repository @avu i have given all test run. I will get back to you once it is done. - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
On Tue, 15 Jun 2021 17:47:27 GMT, Sergey Bylokhov wrote: >> Implemented blit via compute kernel > > src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLLayer.m line 159: > >> 157: [computeEncoder endEncoding]; >> 158: [cb commit]; >> 159: #endif > > This is better than changing the background color, but should be carefully > checked. @jayathirthrao @aghaisas please take a look. > Since this affects every blit to the window I suggest running a full test run. @jayathirthrao @aghaisas please let me know if I can push this change into JDK17 repository - PR: https://git.openjdk.java.net/jdk17/pull/62
Re: [OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
On Tue, 15 Jun 2021 16:57:00 GMT, Alexey Ushakov wrote: > Implemented blit via compute kernel Marked as reviewed by serb (Reviewer). src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLLayer.m line 159: > 157: [computeEncoder endEncoding]; > 158: [cb commit]; > 159: #endif This is better than changing the background color, but should be carefully checked. @jayathirthrao @aghaisas please take a look. Since this affects every blit to the window I suggest running a full test run. - PR: https://git.openjdk.java.net/jdk17/pull/62
[OpenJDK 2D-Dev] [jdk17] RFR: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
Implemented blit via compute kernel - Commit messages: - 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL Changes: https://git.openjdk.java.net/jdk17/pull/62/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk17=62=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8266079 Stats: 289 lines in 4 files changed: 288 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk17/pull/62.diff Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/62/head:pull/62 PR: https://git.openjdk.java.net/jdk17/pull/62