-
-
Notifications
You must be signed in to change notification settings - Fork 636
Fall back to primary gpu for rendering #1281
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
dd7e90d to
5e37e19
Compare
5e37e19 to
f2be61c
Compare
|
doc builds fail caused by ongoing migration of fdo gitlab |
1f85ad6 to
6083bb4
Compare
c4a170b to
6571e85
Compare
43c9e7f to
d0e6120
Compare
d0e6120 to
2d2767d
Compare
| .map(|surface_render_node| surface_render_node == primary_render_node) | ||
| .unwrap_or(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: is_some_and()
| ) | ||
| ); | ||
|
|
||
| !is_ccs && (device.render_node.is_some() || format.modifier == Modifier::Linear) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: would be clearer to write this as an
if device.render_node.is_none() {
return format.modifier == Modifier::Linear;
}at the top of the closure
| .as_mut() | ||
| .add_node(render_node, gbm.clone()) | ||
| .context("error adding render node to GPU manager")?; | ||
| anyhow::ensure!(!egl_device.is_software(), "skipping software device"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: will this break running niri on devices where only llvmpipe is available? E.g. the main GPU driver has too old OpenGL.
(I have no idea if this even works right now, maybe it doesn't, then it's fine, but should add a comment here)
src/backend/tty.rs
Outdated
| // Create GBM allocator. | ||
| let gbm_flags = GbmBufferFlags::RENDERING | GbmBufferFlags::SCANOUT; | ||
| let allocator = GbmAllocator::new(device.gbm.clone(), gbm_flags); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: if you feel like, could split "putting allocator into OutputDevice" into its own commit prior to this commit
| .map(|render_node| render_node == self.primary_render_node) | ||
| .unwrap_or(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: is_some_and()
| output_state | ||
| .frame_clock | ||
| .refresh_interval() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: might be cleaner to extract if let Some(refresh_interval) = output_state.frame_clock.refresh_interval() { outside this whole vblank_remaining_time handling section
| }; | ||
| let throttled_metadata = DrmEventMetadata { | ||
| sequence: meta.sequence, | ||
| time: DrmEventTime::Monotonic(throttled_time), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to set DrmEventTime::Monotonic(Duration::ZERO) here? So that it doesn't get set as as HwClock presentation.
|
Merged the Smithay bump commit |
|
This can be closed now that #2312 is merged |
|
superseded by #2312 @scottmckendry Thanks for taking over, nice work! |
depends on
Smithay/smithay#1680(merged)fixes #910