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

Add gamescope-reshade Wayland interface #1495

Merged
merged 2 commits into from
Sep 7, 2024

Conversation

wheaney
Copy link

@wheaney wheaney commented Aug 29, 2024

Implemented per the suggestion by @Joshua-Ashton in #1082

@@ -7821,7 +7844,7 @@ steamcompmgr_main(int argc, char **argv)

// If we are running behind, allow tearing.

const bool bForceRepaint = g_bForceRepaint.exchange(false);
const bool bForceRepaint = vblank && g_bForceRepaint.exchange(false);
Copy link
Author

@wheaney wheaney Aug 29, 2024

Choose a reason for hiding this comment

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

This wasn't working without the vblank check due to the logic on line 7891:

bShouldPaint = vblank && ( hasRepaint || hasRepaintNonBasePlane || bForceSyncFlip );

Note that this will ignore our bForceRepaint request (that gets passed via bForceSyncFlip) if vblank is false. But by the time this happens, our original force repaint request is lost because g_bForceRepaint.exchange(false) has already been called. So any time this line would get hit while vblank is false will result in the request getting lost. My update makes it so we don't reset the g_bForceRepaint request unless it will actually trigger a repaint.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, makes sense for force repaint to check for vblank.

@misyltoad
Copy link
Collaborator

Is there a client on this interface? I wonder if this is better served by gamescopectl and a gamescope::Command. That would make a client just work(tm).

@wheaney
Copy link
Author

wheaney commented Aug 29, 2024

I've got a working client in this branch of my XR driver.

Can you expand on the gamescopectl and gamescope::Command suggestion?

Edit - just found this comment you made in our last conversion that led me down this path:

Steam uses the Gamescope Control protocol. Feel free to make a Gamescope Shader protocol or whatever.

@wheaney
Copy link
Author

wheaney commented Aug 31, 2024

@Joshua-Ashton just waiting on more details.

@wheaney
Copy link
Author

wheaney commented Sep 5, 2024

@Joshua-Ashton I'd love to get some more guidance or review feedback on this PR. I've got this integration working end-to-end locally with my own client, so it would be nice to wrap up or re-work if needed.

@misyltoad
Copy link
Collaborator

I thought more about it, and this is fine as-is really. It might be nice if you used the new stuff in src/WaylandServer to implement it though. It will probably end up a bit cleaner.

@wheaney
Copy link
Author

wheaney commented Sep 5, 2024

@Joshua-Ashton Okay, thanks. Let me know what the next steps are for this.

@misyltoad
Copy link
Collaborator

I would like the Wayland server parts to use the new helpers there so we aren't adding more stuff for me to rewrite. Other than that it's fine.

@wheaney
Copy link
Author

wheaney commented Sep 5, 2024

@Joshua-Ashton I think the latest commit covers what you've requested.

@misyltoad misyltoad merged commit 7bbc2cd into ValveSoftware:master Sep 7, 2024
1 check passed
@wheaney
Copy link
Author

wheaney commented Sep 7, 2024

@Joshua-Ashton Thanks for merging this! How often does the Preview channel get the latest gamescope updates? And what's the process and typical timeline for changes to migrate through the SteamOS channels? Is there documentation around that process?

@misyltoad
Copy link
Collaborator

It depends a lot, Main gets updated pretty regularly, and Beta whenever think we are ready to push on shipping Main.

Timelines are all over, and semi-made up.

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