Repository navigation
Conversation
sin-ack
left a comment
There was a problem hiding this comment.
Thanks for the contribution. From what I can tell you're getting help from an LLM for this change. That's fine, but:
- The PR description and commit message seem to be generated too. Please describe the change with your own words. LLMs are good at explaining what happened but they're not good at explaining why.
- Unfortunately LLM providers really like to RL their coding models into doing a single commit for all changes, resulting in a hard-to-review PR because it's more difficult to tell which line of code belongs to which change. Please use atomic commits for each separate change being made. I recommend you to look at this repo's history for how I expect things to be structured. You can ask the LLM about how to modify Git history, or make it do the split by itself (although I wouldn't really trust an LLM to run commands on my behalf,
git reflogis your friend here). - As I detailed below, one of the reasons I kinda postponed working on this was due to not being able to figure out how to handle multiple frame-rate options within the same loop (I had initially planned to spawn multiple threads and run a queue on each). The changes below seem to mostly address that nicely, but they use the same frame-rate for all outputs. Instead, make the
--outputflag configure individual outputs which you can then use as the basis for creatingPaperobjects. - Since as part of the changes the command-line options will change, please make sure to update the README too.
e69a7f0 to
5c65287
Compare
|
TYVM for the review and many thanks for taking the time to help me clean up the slop. I divided the chungus squash commit to be atomic. Independent configurable frame rates works. I tested this on Niri and Hyprland and both work for me. |
|
I tried a few things help the user manage gpu utilization
|
bf9161d to
d0f513d
Compare
f07eb8b to
45b23c3
Compare
|
Sorry for the lack of a review, I was on a trip. I'll take a closer look at this on Sunday.
The
Some benchmarks for render time would be cool! |
|
Hope you had a good trip! No rush. As you can see the scope of this PR has extended a bit over the week as I tinkered and tried a few ideas, which has been fun and a good learning experience. Thanks for the feedback and for working with me on this! Good point about the Benchmarks on the shared OpenGL context was interesting technically but not so impactful in my case and probably for most desktop users. Sharing the context reduces the cost of switching surfaces on the driver side ~5% reduction from Commit:
Results (Average of 3 runs, Normalized per Render)
edit----
Results (Average of 3 runs, Normalized per Render)
Seems like a win to me |
|
Thanks again for the detailed review. Following up after spending more time using and testing Papertoy locally: this has been working really well for me, and I appreciate the project. I also have some unrelated local experiments on top of it, but I intentionally kept those out of this PR so this stays focused on multi-output support. I force-pushed a cleaned-up version of the branch with the goal of making the PR easier to review. What changed and why:
Validation:
Runtime smoke tested on Niri with:
|
|
Follow-up fix pushed for the explicit frame-rate path. Why: Change: every surface now always keeps a Wayland frame callback. Checked locally:
I also confirmed the behavior manually on niri before porting the fix here. |
Own-line section comment, boolean fractional-scale check, direct resolution passthrough, discard configure result explicitly. No behavior change.
Description
Papertoy but on multiple displays
independent configuration of frame rate, resolution, and scaling
handles display rotation
tested on Niri and Hyprland, both Nixos and Arch
Per-Output
PaperInstances: Manage each output independently. A newPaperstruct encapsulates all state necessary for rendering on a single output (includingWlrSurface,Shader, and OpenGL contexts). Subsequently decided to try a shared OpenGL context to see if there were any per benefits, if so it wasn't major.Respect Compositor Configuration: The application now correctly processes
zwlr_layer_surface_v1.configureevents, which provide the authoritative logical dimensions from the compositor. This ensures the application always resizes correctly based on compositor instructions.Output Orientation Support: The application now handles
wl_output.geometryevents, which communicate display rotation. It swaps width and height when a display is rotated by 90 or 270 degrees, tested on 3440x1440 vs 1440x3440.wlr_layer_surfaceAnchoring: Layer surfaces are now anchored to all four edges (top,bottom,left,right). This explicitly tells the compositor to stretch the wallpaper to fill the entire output area- this was needed for Niri when the surface might not cover the whole display when in vertical orientation.display scaling: Added a scale parameter to uniformly adjust theresolution.How to Test
1. Performance Mode (Recommended for 4K)
Render at half resolution (1080p on 4K) to save GPU power, but keep the window fullscreen.
$ papertoy shader.glsl --output "id=HDMI-A-1,scale=0.5"2. Multi-Monitor Setup
Configure a high-refresh main monitor and a slower secondary monitor.
3. Custom Resolution
Force a specific aspect ratio or size.
$ papertoy shader.glsl --output "id=DP-1,resolution=800x600"4. All displays at native settings
Automatically render papertoy on all displays
$ papertoy shader.glslVerify that animations are smooth on all displays and that the wallpaper correctly fills the entire screen area, including any fractionally scaled or rotated displays.