Software renderer broken?

As I mentioned in this bug, something broke when I updated to 2.0.6713:
http://bugzilla.libsdl.org/show_bug.cgi?id=1658

I checked and apparently this code causes it to fail (the last call to
abort_program is what triggers the error message):


// Create window
window = SDL_CreateWindow(“Sol”, SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED, 768, 480, 0);
if (window == NULL)
abort_program(ERR_INITVIDEO, NULL);

// Create rendering context
renderer = SDL_CreateRenderer(window, -1,
SDL_RENDERER_SOFTWARE));
if (renderer == NULL)
abort_program(ERR_INITVIDEO, NULL);


If I replace SDL_RENDERER_SOFTWARE with 0, it works just fine, so it
seems the software renderer broke at some point. Before I fill a bug
report, is this indeed a problem or did the software renderer get
dropped at some point? (I added support for it because on some systems
OpenGL conflicts with accessibility tools, and my game is far from
being GPU heavy, it’s only used to stretch a texture)

Also in case you wonder why I was testing with the software
renderer… turns out I had swapped the flags so it was running the
software renderer when it wanted a hardware one and vice versa.
Whoops. Now I have to profile all over again.

It works for me on Mac OS X…

#include “SDL2/SDL.h”

main()
{
SDL_Window *window;
SDL_Renderer *renderer;

// Create window
window = SDL_CreateWindow(“Sol”, SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED, 768, 480, 0);
if (window == NULL)
fprintf(stderr, “couldn’t create window\n”);

// Create rendering context
renderer = SDL_CreateRenderer(window, -1,
SDL_RENDERER_SOFTWARE);
if (renderer == NULL)
fprintf(stderr, “couldn’t create renderer\n”);
}On Thu, Dec 6, 2012 at 6:40 AM, Sik the hedgehog <sik.the.hedgehog at gmail.com wrote:

As I mentioned in this bug, something broke when I updated to 2.0.6713:
Message boxes on X don't support UTF-8 · Issue #715 · libsdl-org/SDL · GitHub

I checked and apparently this code causes it to fail (the last call to
abort_program is what triggers the error message):


// Create window
window = SDL_CreateWindow(“Sol”, SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED, 768, 480, 0);
if (window == NULL)
abort_program(ERR_INITVIDEO, NULL);

// Create rendering context
renderer = SDL_CreateRenderer(window, -1,
SDL_RENDERER_SOFTWARE));
if (renderer == NULL)
abort_program(ERR_INITVIDEO, NULL);


If I replace SDL_RENDERER_SOFTWARE with 0, it works just fine, so it
seems the software renderer broke at some point. Before I fill a bug
report, is this indeed a problem or did the software renderer get
dropped at some point? (I added support for it because on some systems
OpenGL conflicts with accessibility tools, and my game is far from
being GPU heavy, it’s only used to stretch a texture)

Also in case you wonder why I was testing with the software
renderer… turns out I had swapped the flags so it was running the
software renderer when it wanted a hardware one and vice versa.
Whoops. Now I have to profile all over again.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Um, maybe that code works but causes the next step to fail?------------------------------------------------------------
// Create texture used to copy the framebuffer to screen
texture = SDL_CreateTexture(renderer,
SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING,
512, 256);
if (texture == NULL)
abort_program(ERR_INITVIDEO, NULL);

That’s the only other place where it can fail with that error code. If
this fails it’s either a bug or the software renderer isn’t meant to
support textures and I don’t know it - though considering it was
working just fine, it probably is meant to support them.

2012/12/7 Sam Lantinga :

It works for me on Mac OS X…

#include “SDL2/SDL.h”

main()
{
SDL_Window *window;
SDL_Renderer *renderer;

// Create window
window = SDL_CreateWindow(“Sol”, SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED, 768, 480, 0);
if (window == NULL)
fprintf(stderr, “couldn’t create window\n”);

// Create rendering context
renderer = SDL_CreateRenderer(window, -1,
SDL_RENDERER_SOFTWARE);
if (renderer == NULL)
fprintf(stderr, “couldn’t create renderer\n”);
}

On Thu, Dec 6, 2012 at 6:40 AM, Sik the hedgehog <@Sik_the_hedgehog> wrote:

As I mentioned in this bug, something broke when I updated to 2.0.6713:
Message boxes on X don't support UTF-8 · Issue #715 · libsdl-org/SDL · GitHub

I checked and apparently this code causes it to fail (the last call to
abort_program is what triggers the error message):


// Create window
window = SDL_CreateWindow(“Sol”, SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED, 768, 480, 0);
if (window == NULL)
abort_program(ERR_INITVIDEO, NULL);

// Create rendering context
renderer = SDL_CreateRenderer(window, -1,
SDL_RENDERER_SOFTWARE));
if (renderer == NULL)
abort_program(ERR_INITVIDEO, NULL);


If I replace SDL_RENDERER_SOFTWARE with 0, it works just fine, so it
seems the software renderer broke at some point. Before I fill a bug
report, is this indeed a problem or did the software renderer get
dropped at some point? (I added support for it because on some systems
OpenGL conflicts with accessibility tools, and my game is far from
being GPU heavy, it’s only used to stretch a texture)

Also in case you wonder why I was testing with the software
renderer… turns out I had swapped the flags so it was running the
software renderer when it wanted a hardware one and vice versa.
Whoops. Now I have to profile all over again.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Weird, just tried enabling the software renderer again today and it
worked just fine o_O I didn’t update SDL or anything.

2012/12/7 Sik the hedgehog <@Sik_the_hedgehog>:> Um, maybe that code works but causes the next step to fail?


// Create texture used to copy the framebuffer to screen
texture = SDL_CreateTexture(renderer,
SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING,
512, 256);
if (texture == NULL)
abort_program(ERR_INITVIDEO, NULL);

That’s the only other place where it can fail with that error code. If
this fails it’s either a bug or the software renderer isn’t meant to
support textures and I don’t know it - though considering it was
working just fine, it probably is meant to support them.

2012/12/7 Sam Lantinga :

It works for me on Mac OS X…

#include “SDL2/SDL.h”

main()
{
SDL_Window *window;
SDL_Renderer *renderer;

// Create window
window = SDL_CreateWindow(“Sol”, SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED, 768, 480, 0);
if (window == NULL)
fprintf(stderr, “couldn’t create window\n”);

// Create rendering context
renderer = SDL_CreateRenderer(window, -1,
SDL_RENDERER_SOFTWARE);
if (renderer == NULL)
fprintf(stderr, “couldn’t create renderer\n”);
}

On Thu, Dec 6, 2012 at 6:40 AM, Sik the hedgehog <@Sik_the_hedgehog> wrote:

As I mentioned in this bug, something broke when I updated to 2.0.6713:
Message boxes on X don't support UTF-8 · Issue #715 · libsdl-org/SDL · GitHub

I checked and apparently this code causes it to fail (the last call to
abort_program is what triggers the error message):


// Create window
window = SDL_CreateWindow(“Sol”, SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED, 768, 480, 0);
if (window == NULL)
abort_program(ERR_INITVIDEO, NULL);

// Create rendering context
renderer = SDL_CreateRenderer(window, -1,
SDL_RENDERER_SOFTWARE));
if (renderer == NULL)
abort_program(ERR_INITVIDEO, NULL);


If I replace SDL_RENDERER_SOFTWARE with 0, it works just fine, so it
seems the software renderer broke at some point. Before I fill a bug
report, is this indeed a problem or did the software renderer get
dropped at some point? (I added support for it because on some systems
OpenGL conflicts with accessibility tools, and my game is far from
being GPU heavy, it’s only used to stretch a texture)

Also in case you wonder why I was testing with the software
renderer… turns out I had swapped the flags so it was running the
software renderer when it wanted a hardware one and vice versa.
Whoops. Now I have to profile all over again.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org