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

Buffer synchronization issues in CS2 after AQ MR #6964

Closed
vaxerski opened this issue Jul 21, 2024 · 22 comments · Fixed by #7151
Closed

Buffer synchronization issues in CS2 after AQ MR #6964

vaxerski opened this issue Jul 21, 2024 · 22 comments · Fixed by #7151
Labels
bug Something isn't working
Milestone

Comments

@vaxerski
Copy link
Member

vaxerski commented Jul 21, 2024

Regression?

Yes

System Info and Version

You wish. Aq merge.

RX 6700 XT

Description

Basically what @romanstingler said: #6608 (comment)

How to reproduce

Use the steam overlay in CS2, can also happen with the viewmodel / buy menu

Crash reports, logs, images, videos

No response

@vaxerski vaxerski added the bug Something isn't working label Jul 21, 2024
@vaxerski vaxerski added this to the 0.42 milestone Jul 21, 2024
@vaxerski
Copy link
Member Author

@ikalco any progress here?

@ikalco
Copy link
Contributor

ikalco commented Jul 23, 2024

setting vsync fixes the flickering after game restart
ds also works

its probably something with the new explicit sync stuff messing with implicit sync
I have a feeling surface commits are somehow broken, like commitPendingState

ps:
the proton thing was because it was in ds lol
also putting a glFinish() in renderSurface makes it better, but thats wrong

@vaxerski
Copy link
Member Author

setting vsync fixes the flickering after game restart

in cs2?

ds also works

speak for yourself

its probably something with the new explicit sync stuff messing with implicit sync

I have explicit disabled

@ikalco
Copy link
Contributor

ikalco commented Jul 23, 2024

in cs2?

yes
open game, turn on vsync, still flickering, exit game and reopen, no more flickering

its probably something with the new explicit sync stuff messing with implicit sync

I have explicit disabled

i meant that some of the code that was changed for explicit sync might have broken implicit sync even with the option off

edit:
also forgot to mention that if you lower fps below rr the flickering only happens when the mouse is moved

@vaxerski
Copy link
Member Author

hm, I thought all of it would be neutered with the opt disabled

@vaxerski
Copy link
Member Author

I have vsync enabled in cs2 and nothign changed

@vaxerski
Copy link
Member Author

also forgot to mention that if you lower fps below rr the flickering only happens when the mouse is moved

not the case here, it does it constantly

@ikalco
Copy link
Contributor

ikalco commented Jul 24, 2024

yeah i cant find what got reverted
prob in aq or something

@vaxerski
Copy link
Member Author

debug's glitches go away when I fullscreen

can't say the same about release

@vaxerski
Copy link
Member Author

okay. It's direct scanout. With DS, it's gone. Without, it is there. Too bad I can't play cs2 with ds.

@ikalco
Copy link
Contributor

ikalco commented Jul 25, 2024

egl init stuff looks the same except for maybe a few extension checks and the version
eglCreateImage/eglDestroyImage are used the same as before

this is so fucked

@ikalco
Copy link
Contributor

ikalco commented Jul 25, 2024

as far as i can tell there's only one surface being rendered for csgo which means that for some reason the steam overlay just isnt drawn by it every few frames...

I have a theory:
CSGO is trying to put out frames at max fps but the overlay is only rendering at rr
This means some frames submitted by CSGO have game stuff but not overlay stuff, therefore flickering

no idea how to test that but ill try later

@vaxerski
Copy link
Member Author

vaxerski commented Jul 25, 2024

not possible. Before aq and sway work correctly.

Furthermore, in-game, sometimes the buy menu or viewmodel also flicker

@LOSEARDES77
Copy link
Contributor

I dont know if this is the same issue but i'm getting this effect. If i restart the game or something it goes away for a bit but allways comes back

untitled.mp4

@vaxerski
Copy link
Member Author

plausible

@LOSEARDES77
Copy link
Contributor

untitled.mp4

Maybe an nvidia issue too
I am using the 560 drivers with this

@romanstingler
Copy link
Contributor

romanstingler commented Jul 29, 2024

untitled.mp4

Maybe an nvidia issue too I am using the 560 drivers with this

also very possible. 560 is borked, according to CachyOS devs

@mahkoh
Copy link

mahkoh commented Aug 2, 2024

Current xwayland and radv require the compositor to support explicit sync. https://gitlab.freedesktop.org/mesa/mesa/-/issues/11294

@vaxerski
Copy link
Member Author

vaxerski commented Aug 2, 2024

are you sure? because of two things:

  • mesa on my pc will not use explicit sync at all even if I enable it in hyprland (it just doesnt bind the protocol at all)
  • rolling back to before aquamarine fixes this problem

@mahkoh
Copy link

mahkoh commented Aug 2, 2024

mesa on my pc will not use explicit sync at all even if I enable it in hyprland (it just doesnt bind the protocol at all)

My comment is about current radv/mesa. If your mesa is older than 24.1 then you are likely not affected by the linked issue.

are you sure?

The issue says as much. But I'm not saying that hyprland doesn't have additional bugs.

@vaxerski
Copy link
Member Author

vaxerski commented Aug 2, 2024

hm, right, I see my mesa ver is 24.1.4. Explicit sync is kinda wonky in Hyprland atm, weird though that sway works then (despite the lack of explicit sync support...?)

@vaxerski
Copy link
Member Author

vaxerski commented Aug 2, 2024

thanks @mahkoh for linking the issue though, after some tinkering with explicit sync it seems to be working, though I have some doubts about our internal sync mechanisms, I'll make a MR and we'll test more there

@vaxerski vaxerski mentioned this issue Aug 2, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants