-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8264475: CopyArea ignores clip state in metal rendering pipeline #3283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back jdv! A progress list of the required criteria for merging this PR into |
|
@jayathirthrao The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLTexurePool.m
Show resolved
Hide resolved
Webrevs
|
|
/issue add JDK-8251036 |
|
@jayathirthrao |
|
I tested this fix. No regressions were observed. Using MTLBlitCommandEncoder is intuitive when metal resource copying needs to be done. |
Thanks Ajit for testing the fix. I have added comment mentioning why we use MTLRenderCommandEncoder and not MTLBlitCommandEncoder. |
src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBlitLoops.m
Outdated
Show resolved
Hide resolved
src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBlitLoops.m
Outdated
Show resolved
Hide resolved
src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBlitLoops.m
Outdated
Show resolved
Hide resolved
|
@jayathirthrao This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 27 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
Just curious how this new "round trip" will affect the performance when the clip is set and when not? is it cheap? |
I am not getting what do you mean by 'new "round trip" '. Please elaborate. |
The new code path which takes care of the clip, if there is no degradation means that we get it for free? |
Before this change we used to get blitEncoder from same commandbuffer(and same CommandQueue) as we are doing now. And then commit the commandbuffer, so from computational perspective we are not holding or doing anything extra in new implementation. We need to use appropriate encoder(where scissor is set) to honour clip in copyArea. Since we are not seeing any difference in performance numbers (especially in swingmark where we do lot of scrolling/copyArea) we are basically getting clipping in copyArea without any degradation. Also in Netbeans i have done good amount scrolling test and i dont see any degradation. Also i expected improvement in performance (we are seeing little improvement in swingmark numbers) because we are actually doing less amount of copy operation now. |
It is quite interesting that blitting with or without clipping does not have any difference. thank you for confirmation. but probably our perf tests are not good enough. |
Exactly i suspect we are not hitting threshold of GPU computing in our tests. If we hit GPU threshold with larger clip bounds i expect performance to be on higher side after the fix. |
|
@mrserb Are there any more inputs/review comments? |
|
nop, it is fine. |
|
/integrate |
|
@jayathirthrao Since your change was applied there have been 54 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 0039c18. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
In MTLBlitLoops.copyArea() we use standalone encoder which has no clip state information because of which we ignore clip parameters set in rect clip and shape clip. We need to query and use encoders from EncoderManager to honour clip states in copyArea.
Progress
Issues
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3283/head:pull/3283$ git checkout pull/3283Update a local copy of the PR:
$ git checkout pull/3283$ git pull https://git.openjdk.java.net/jdk pull/3283/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3283View PR using the GUI difftool:
$ git pr show -t 3283Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3283.diff