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

Feature/software renderer #1228

Merged
merged 8 commits into from
Jan 5, 2024
Merged

Conversation

cmeissl
Copy link
Collaborator

@cmeissl cmeissl commented Nov 13, 2023

This PR adds a new pixman based software renderer

TODO:

  • Docs
  • Anvil will be done in a separate PR
  • pixman-rs release
  • cleanup drm fb exporter

@cmeissl cmeissl force-pushed the feature/software_renderer branch 4 times, most recently from dc4b5aa to 78215a2 Compare November 26, 2023 19:45
@codecov-commenter
Copy link

codecov-commenter commented Nov 26, 2023

Codecov Report

Attention: 79 lines in your changes are missing coverage. Please review.

Comparison is base (ee02198) 21.61% compared to head (6ce537c) 21.54%.

Files Patch % Lines
src/backend/allocator/dmabuf.rs 0.00% 79 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1228      +/-   ##
==========================================
- Coverage   21.61%   21.54%   -0.07%     
==========================================
  Files         155      155              
  Lines       24718    24797      +79     
==========================================
  Hits         5342     5342              
- Misses      19376    19455      +79     
Flag Coverage Δ
wlcs-buffer 18.61% <0.00%> (-0.06%) ⬇️
wlcs-core 18.27% <0.00%> (-0.06%) ⬇️
wlcs-output 7.62% <0.00%> (-0.03%) ⬇️
wlcs-pointer-input 20.34% <0.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cmeissl cmeissl force-pushed the feature/software_renderer branch 2 times, most recently from fa3498a to f0f4ae7 Compare November 28, 2023 15:47
@cmeissl cmeissl marked this pull request as ready for review November 28, 2023 16:19
let (fb, format) = match ret {
Ok(fb) => fb,
Err(source) => {
let fourcc = format.code;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it'd be worth putting a debug!() here since most/all drivers we use should support addfb2, and this fallback shouldn't happen

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You mean a log message? So more like a tracing::warn?

Copy link
Member

Choose a reason for hiding this comment

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

If a warn!, we should make sure to not send this on every occurrence, but once.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added a warn wrapped in an Once::call_once to warn once about the legacy fallback path

src/backend/renderer/pixman/mod.rs Outdated Show resolved Hide resolved
src/backend/renderer/pixman/mod.rs Show resolved Hide resolved
@cmeissl cmeissl force-pushed the feature/software_renderer branch 2 times, most recently from b0cefed to 50c4999 Compare November 29, 2023 11:36
This was referenced Nov 29, 2023
@Drakulix
Copy link
Member

Drakulix commented Nov 30, 2023

Before I forget, can we please reexport the pixman crate either in the reexports module or in backend::renderer::pixman given some types are part of the public api? (E.g. in From<pixman::Image> for PixmanRenderBuffer)

@cmeissl
Copy link
Collaborator Author

cmeissl commented Dec 26, 2023

Before I forget, can we please reexport the pixman crate either in the reexports module or in backend::renderer::pixman given some types are part of the public api? (E.g. in From<pixman::Image> for PixmanRenderBuffer)

Added under re-exports

this allows the resulting dmabuf to be mapped
read/write for rendering
this allows to create a dumb buffer allocator
from an open drm device fd.
Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

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

LGTM!

@Drakulix Drakulix merged commit e381941 into Smithay:master Jan 5, 2024
13 checks passed
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.

5 participants