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

GPU: logging an error when no backend available. #10923

Closed
icculus opened this issue Sep 22, 2024 · 4 comments
Closed

GPU: logging an error when no backend available. #10923

icculus opened this issue Sep 22, 2024 · 4 comments
Milestone

Comments

@icculus
Copy link
Collaborator

icculus commented Sep 22, 2024

This line in src/gpu/SDL_gpu.c's SDL_GPUSelectBackend() ...

    SDL_LogError(SDL_LOG_CATEGORY_GPU, "No supported SDL_GPU backend found!");

...causes the console to pop up on all the examples, because we don't have WebGPU support yet (and when we do, there still may be browsers without it). Since we have a GPU renderer backend, we hit this even though the system falls back to the completely-usable opengles2 backend for 2D stuff.

You can see it here: https://examples.libsdl.org/SDL3/renderer/05-rectangles/

Can we remove this logging, or make it not log as an error?

@icculus icculus added this to the 3.0 ABI milestone Sep 22, 2024
@Akaricchi
Copy link
Contributor

Related #10779

@slouken
Copy link
Collaborator

slouken commented Sep 22, 2024

In general the GPU code over-logs and needs to have the verbosity reduced.

@flibitijibibo
Copy link
Collaborator

flibitijibibo commented Sep 23, 2024

I should be able to clear out all the logging in gpu.c tomorrow. What will take much longer are the backends; really we just need to make recoverable errors SetError and nonrecoverable errors either log or call an internal SDL_FatalGPUError helper to both log and SetError. Info/Warnings should be able to stay as they are unless I've forgotten any particularly bad ones.

@flibitijibibo
Copy link
Collaborator

gpu.c logs are fixed via 4a3faf2

For the overall logging situation, see #10779

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