Skip to content

Steam Deck. Setting MAILBOX with SDL_GPU_SWAPCHAINCOMPOSITION_SDR returns composition not supported #12837

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

Open
mshvern opened this issue Apr 17, 2025 · 3 comments
Assignees
Milestone

Comments

@mshvern
Copy link

mshvern commented Apr 17, 2025

I set the present mode on Steam Deck approximately the following way.

        if (SDL_WindowSupportsGPUPresentMode(
            gpu.device,
            gpu.window,
            SDL_GPU_PRESENTMODE_MAILBOX)) {

            LOG_SDL_ERROR(SDL_SetGPUSwapchainParameters(
                gpu.device,
                gpu.window,
                SDL_GPU_SWAPCHAINCOMPOSITION_SDR,
                SDL_GPU_PRESENTMODE_MAILBOX), "setting mailbox");
        }

From documentation:

  • SDL_GPU_PRESENTMODE_VSYNC and SDL_GPU_SWAPCHAINCOMPOSITION_SDR are always supported.

Which is why I only check present mode, which returns OK.

@mshvern
Copy link
Author

mshvern commented Apr 17, 2025

OK this is 100% the issue.

Docstring is contradicted by behavior of the emulated DirectX backend on Steam Deck

My current "fix."

if (!SDL_WindowSupportsGPUSwapchainComposition(gpu.device, gpu.window, SDL_GPU_SWAPCHAINCOMPOSITION_SDR)) {
        append_to_log("Cannot do anything to vsync, probably running on steam deck?");
        return;
    }

Am I reading this wrong and does the docstring mean that setting both at the same time is always supported?

@slouken slouken added this to the 3.2.12 milestone Apr 22, 2025
@thatcosmonaut
Copy link
Collaborator

Should probably say SDL_GPU_PRESENTMODE_VSYNC with SDL_GPU_SWAPCHAINCOMPOSITION_SDR is always supported.

@slouken
Copy link
Collaborator

slouken commented Apr 23, 2025

The documentation is fixed in 695cad4, is that all that needs to be done here?

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

No branches or pull requests

4 participants