Revision 307ccc9c135e kills ability to update textures out of main thread (GL renderer)

Recently I started updating my project that was running on SVN dated 2010 version of 1.3 to match latest changes in HG. Unfortunately once I made all the needed changes it turned out that program started to crash on SDL_UnlockTexture.

The suspect is r5156 (307ccc9c135e) described “Made it possible to create a texture of any format, even if not supported by the renderer. This allows me to reduce the set of formats supported by the renderers to the most optimal set, for a nice speed boost.”

Fine description, but in fact it has also removed all dirty rect functionality, that was substantial to be able to modify texture content out of main thread (at least using OpenGL which isn’t really thread safe).
Unfortunately we need this very much, as we relay on multithreaded video decompression, and we do update textures in out of main thread. This revision causes program to crash upon SDL_UnloadTexture as it now does update GL texture rather just marking it dirty.

Any way to bring this back, or maybe there’s some workaround?

Regards,–
Adam Strzelecki

Never mind, I have found easy workaround.

Regards,–
Adam Strzelecki

Wiadomo?? napisana przez Adam Strzelecki w dniu 2011-03-30, o godz. 22:09:

Recently I started updating my project that was running on SVN dated 2010 version of 1.3 to match latest changes in HG. Unfortunately once I made all the needed changes it turned out that program started to crash on SDL_UnlockTexture.

The suspect is r5156 (307ccc9c135e) described “Made it possible to create a texture of any format, even if not supported by the renderer. This allows me to reduce the set of formats supported by the renderers to the most optimal set, for a nice speed boost.”

http://hg.libsdl.org/SDL/rev/307ccc9c135e

Fine description, but in fact it has also removed all dirty rect functionality, that was substantial to be able to modify texture content out of main thread (at least using OpenGL which isn’t really thread safe).
Unfortunately we need this very much, as we relay on multithreaded video decompression, and we do update textures in out of main thread. This revision causes program to crash upon SDL_UnloadTexture as it now does update GL texture rather just marking it dirty.

Any way to bring this back, or maybe there’s some workaround?

mind sharing it with the list? :slight_smile:

2011/4/4 Adam Strzelecki :> Never mind, I have found easy workaround.

Regards,

Adam Strzelecki

Wiadomo?? napisana przez Adam Strzelecki w dniu 2011-03-30, o godz. 22:09:

Recently I started updating my project that was running on SVN dated 2010 version of 1.3 to match latest changes in HG. Unfortunately once I made all the needed changes it turned out that program started to crash on SDL_UnlockTexture.

The suspect is r5156 (307ccc9c135e) described “Made it possible to create a texture of any format, even if not supported by the renderer. This allows me to reduce the set of formats supported by the renderers to the most optimal set, for a nice speed boost.”

http://hg.libsdl.org/SDL/rev/307ccc9c135e

Fine description, but in fact it has also removed all dirty rect functionality, that was substantial to be able to modify texture content out of main thread (at least using OpenGL which isn’t really thread safe).
Unfortunately we need this very much, as we relay on multithreaded video decompression, and we do update textures in out of main thread. This revision causes program to crash upon SDL_UnloadTexture as it now does update GL texture rather just marking it dirty.

Any way to bring this back, or maybe there’s some workaround?


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