Skip to content
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

use pixman for cursor plane rendering #126

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

cmeissl
Copy link
Contributor

@cmeissl cmeissl commented Jan 23, 2024

update necessary after Smithay/smithay#1294 to use cursor plane for default cursor when rendering is needed

Copy link
Owner

@YaLTeR YaLTeR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave this a quick test, seems to work nicely, and render_cursor_plane in Tracy went from ~1.5 ms mean to ~0.4 ms mean, cool!

@cmeissl cmeissl force-pushed the feature/pixman_cursor_plane branch from aa369b2 to 5207b12 Compare January 24, 2024 19:28
@cmeissl
Copy link
Contributor Author

cmeissl commented Jan 24, 2024

Gave this a quick test, seems to work nicely, and render_cursor_plane in Tracy went from ~1.5 ms mean to ~0.4 ms mean, cool!

This (and the comment in the smithay PR from drakulix about the format), reminded me that I forgot to check the
format in niri. So this now also includes the format correction. This has two nice effects, first the color (if you have colored
cursors) is now correct and it also enables the fast-path where we skip rendering all together if the size matches (no scaling or transform). So I would expect that if the cursor size matches the physical size it should take < 0.2 ms to copy the cursor.

@cmeissl cmeissl force-pushed the feature/pixman_cursor_plane branch from 5207b12 to a87aca6 Compare January 24, 2024 20:08
@cmeissl cmeissl marked this pull request as ready for review January 24, 2024 20:09
@cmeissl cmeissl marked this pull request as draft January 24, 2024 20:41
@cmeissl
Copy link
Contributor Author

cmeissl commented Jan 24, 2024

Waiting for Smithay/smithay#1302

@cmeissl cmeissl force-pushed the feature/pixman_cursor_plane branch from a87aca6 to 0f5bf38 Compare January 24, 2024 21:49
@cmeissl cmeissl force-pushed the feature/pixman_cursor_plane branch from 0f5bf38 to 3dba633 Compare January 24, 2024 21:52
@cmeissl cmeissl marked this pull request as ready for review January 24, 2024 21:54
@YaLTeR YaLTeR merged commit 73f3c16 into YaLTeR:main Jan 25, 2024
5 checks passed
@YaLTeR
Copy link
Owner

YaLTeR commented Jan 25, 2024

Thanks! Yeah, now render_cursor_plane() has disappeared completely, save for three calls, for a similar test scenario to what I did above when it was in the hundreds. try_assign_cursor_plane(), whenever it is non-trivial, is in the 0.2-0.3 ms range (note linear time and log values):

image

There are just a few high outliers that seem to be some GPU stalls:

image

@cmeissl cmeissl deleted the feature/pixman_cursor_plane branch January 25, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants