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

Some games break after the update #1736

Open
3 of 6 tasks
cahsobo opened this issue Feb 1, 2025 · 1 comment · May be fixed by #1737
Open
3 of 6 tasks

Some games break after the update #1736

cahsobo opened this issue Feb 1, 2025 · 1 comment · May be fixed by #1737

Comments

@cahsobo
Copy link

cahsobo commented Feb 1, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Are you using any gamescope patches or a forked version of gamescope?

  • The issue occurs on upstream gamescope without any modifications

Current Behavior

Ultra SFIV and Sonic & All-Stars Racing Transformed are broken after the update. It was fine before. But I didn't have a chance to write down the previous version.

Steps To Reproduce

Run both games in SteamOS gaming mode or add gamescope to launch options

Hardware information

- Distro: Nobara 41
- CPU: AMD Ryzen 5 Pro 2400G
- GPU: AMD Vega IGP
- Driver Version: 24.

Software information

- Desktop environment: KDE Plasma
- Session type: Wayland
- Gamescope version: 3.16.1-3
- Gamescope launch command(s): default

Which gamescope backends have the issue you are reporting?

  • Wayland (default for nested gamescope)
  • DRM (default for embedded gamescope, i.e. gamescope-session)
  • SDL
  • OpenVR

Logging, screenshots, or anything else

No response

@matte-schwartz
Copy link

You're on Nobara which builds both the 32-bit and 64-bit gamescope layers together. There's a known issue with the 32-bit layer in gamescope 3.16.1 that's being tracked here: #1718

For now on affected titles you can use ENABLE_GAMESCOPE_WSI=0 %command% as a launch option, and I'm currently working on a patch to try and address it.

matte-schwartz added a commit to matte-schwartz/gamescope that referenced this issue Feb 1, 2025
fprintf pointers added in "layer: Fix oldSwapchain when going in/out of
XWayland bypassing" will crash when executed in the 32-bit WSI layer.
The compiler also warns about pointer usage:

 1085 |       fprintf(stderr, "[Gamescope WSI] Destroying swapchain: %p\n", swapchain);
      |                                                              ~^     ~~~~~~~~~
      |                                                               |     |
      |                                                               void* VkSwapchainKHR {aka long long unsigned int}
      |                                                              %lld

 1087 |       fprintf(stderr, "[Gamescope WSI] Destroyed swapchain: %p\n", swapchain);
      |                                                             ~^     ~~~~~~~~~
      |                                                              |     |
      |                                                              void* VkSwapchainKHR {aka long long unsigned int}
      |                                                             %lld

 1167 |       fprintf(stderr, "[Gamescope WSI] Creating swapchain for xid: 0x%0x - oldSwapchain: %p - provided minImageCount: %u - minImageCount: %u - format: %s - colorspace: %s - flip: %s\n",
      |                                                                                          ~^
      |                                                                                           |
      |                                                                                           void*
      |                                                                                          %lld
 1168 |         gamescopeSurface->window,
 1169 |         pCreateInfo->oldSwapchain,
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~
      |                      |
      |                      long long unsigned int

 1248 |       fprintf(stderr, "[Gamescope WSI] Created swapchain for xid: 0x%0x swapchain: %p - imageCount: %u\n",
      |                                                                                    ~^
      |                                                                                     |
      |                                                                                     void*
      |                                                                                    %lld
 1249 |         gamescopeSurface->window,
 1250 |         *pSwapchain,
      |         ~~~~~~~~~~~
      |         |
      |         VkSwapchainKHR {aka long long unsigned int}

Address these issues by casting the pointers to void, ensuring both
64-bit and 32-bit layers perform as expected.

Closes: ValveSoftware#1718
Closes: ValveSoftware#1736
matte-schwartz added a commit to matte-schwartz/gamescope that referenced this issue Feb 1, 2025
Some fprintf pointers added in "layer: Fix oldSwapchain when going in/out
of XWayland bypassing" will crash when executed in the 32-bit WSI layer.

GCC also warns about the pointer usage with:

```
 1085 |       fprintf(stderr, "[Gamescope WSI] Destroying swapchain: %p\n", swapchain);
      |                                                              ~^     ~~~~~~~~~
      |                                                               |     |
      |                                                               void* VkSwapchainKHR {aka long long unsigned int}
      |                                                              %lld

 1087 |       fprintf(stderr, "[Gamescope WSI] Destroyed swapchain: %p\n", swapchain);
      |                                                             ~^     ~~~~~~~~~
      |                                                              |     |
      |                                                              void* VkSwapchainKHR {aka long long unsigned int}
      |                                                             %lld

 1167 |       fprintf(stderr, "[Gamescope WSI] Creating swapchain for xid: 0x%0x - oldSwapchain: %p - provided minImageCount: %u - minImageCount: %u - format: %s - colorspace: %s - flip: %s\n",
      |                                                                                          ~^
      |                                                                                           |
      |                                                                                           void*
      |                                                                                          %lld
 1168 |         gamescopeSurface->window,
 1169 |         pCreateInfo->oldSwapchain,
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~
      |                      |
      |                      long long unsigned int

 1248 |       fprintf(stderr, "[Gamescope WSI] Created swapchain for xid: 0x%0x swapchain: %p - imageCount: %u\n",
      |                                                                                    ~^
      |                                                                                     |
      |                                                                                     void*
      |                                                                                    %lld
 1249 |         gamescopeSurface->window,
 1250 |         *pSwapchain,
      |         ~~~~~~~~~~~
      |         |
      |         VkSwapchainKHR {aka long long unsigned int}
```

To keep it simple, let's just cast the problematic pointers to void*.

Closes:  ValveSoftware#1718
Closes:  ValveSoftware#1736
matte-schwartz added a commit to matte-schwartz/gamescope that referenced this issue Feb 1, 2025
Some fprintf pointers added in "layer: Fix oldSwapchain when going in/out
of XWayland bypassing" will crash when executed in the 32-bit WSI layer.

GCC also warns about the pointer usage when compiling the 32-bit layer:
"warning: format ‘%p’ expects argument of type ‘void*’, but argument 3
has type ‘VkSwapchainKHR’ {aka ‘long long unsigned int’} [-Wformat=]"

To keep it simple, let's just reinterpret_cast the problematic pointers
to void*.

Closes:  ValveSoftware#1718
Closes:  ValveSoftware#1736
matte-schwartz added a commit to matte-schwartz/gamescope that referenced this issue Feb 1, 2025
Some fprintf pointers added in "layer: Fix oldSwapchain when going in/out
of XWayland bypassing" will crash when executed in the 32-bit WSI layer.

GCC also warns about the pointer usage when compiling the 32-bit layer:
"warning: format ‘%p’ expects argument of type ‘void*’, but argument 3
has type ‘VkSwapchainKHR’ {aka ‘long long unsigned int’} [-Wformat=]"

To keep it simple, let's just reinterpret_cast the problematic pointers
to void*.

Closes:  ValveSoftware#1718
Closes:  ValveSoftware#1736
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 a pull request may close this issue.

2 participants