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

SDL2-2.0.8 with Directfb requires hardware accelerator to work? #2954

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

SDL2-2.0.8 with Directfb requires hardware accelerator to work? #2954

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 2.0.8
Reported for operating system, platform: Linux, ARM

Comments on the original bug report:

On 2018-08-16 22:41:51 +0000, Peter Thompson wrote:

For example, the SDL2 wiki "SDL_GetWindowSurface" sample code

https://wiki.libsdl.org/SDL_GetWindowSurface

doesn't work with directfb unless there is a hardware accelerator AFAIK. With "software" only, it exits with an error.

The source code (SDL2/src/video/SDL_video.c) call stack shown below shows why:

1 SDL_GetWindowSurface

2 SDL_CreateWindowFramebuffer

3 _this->CreateWindowFramebuffer == SDL_CreateWindowTexture for directFB

3 SDL_CreateWindowTexture

4 SDL_GetWindowData

SDL_CreateWindowTexture executes the following code (SDL_video.c)
if (!renderer) {
for (i = 0; i < SDL_GetNumRenderDrivers(); ++i) {
SDL_RendererInfo info;
SDL_GetRenderDriverInfo(i, &info);
if (SDL_strcmp(info.name, "software") != 0) {
renderer = SDL_CreateRenderer(window, i, 0);
if (renderer) {
break;
}
}
}
}
if (!renderer) {
return SDL_SetError("No hardware accelerated renderers available");

    /* Create the data after we successfully create the renderer (bug # 1116) */

SDL_CreateRenderer() which calls SW_CreateRenderer() for "software" also does not work because SDL_GetWindowSurface gets called in the process.

I am quite sure this all used to work in earlier versions of SDL2. Also Buildroot creates SDL2 with directfb used to work and no longer does (which is why I am writing this note). Hence I am assuming this is a bug. Not sure if bug # 1116 commented in the source code is related or not.

On 2018-08-28 01:40:26 +0000, Peter Thompson wrote:

SDL2 on Beaglebone Black works using DirectFB using the following patch

https://hg.libsdl.org/SDL/raw-rev/751cdc74d55c

which was created by Sam Lantinga and which is to be incorporated in the next release of SDL2.

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

1 participant