multi-thread unsafe operations

Started by raft, March 27, 2013, 01:45:26 PM

Previous topic - Next topic

raft

Egon can you please briefly document what operations are or aren't safe for multi threading? for example rendering, displaying buffer and modifying an object/mesh which is in the rendered world obviously are not.

I'm pretty convinced that I'm sometimes having a multi-threading issue because of level loading at background. I basicly create a new world, load game objects from serialized data, attach vertex controllers and create particles. all of these are new instances. shadows are initialized later on in GL thread. no texture loading here either.

but I guess, one of these operations (or another one which I missed) is causing a multi-threading issue.

EgonOlsen

Doesn't sound like something that is supposed to raise any problems to me. What kind of issue do you have with this? Does it go away if you don't do the loading in another thread?

raft

it's the one I've mentioned in this post. you said it was looking like a threading issue. however you cant see it since I had deleted the video from my server. I will record another tomorrow..

raft


raft

there are some quads which are loaded in another thread and share mesh and compiled data with a master copy, can it be causing the problem?

EgonOlsen

I'm not sure...in that video, it's constantly loading stuff in the background? What happens, if you don't load any data in the background?

raft

no, game loading and game rendering is not done in parallel. what is in the video is render stage only. when loading starts previous game is discarded and a loading text is blitted. just like in the android version.

I'll try loading game in GL thread and post results

EgonOlsen

I doubt that this has anything to do with loading stuff in a background thread. It looks more some multi threaded operations at runtime. But if that doesn't happen, i've no idea what should cause it nor have i ever seen something like that. If nothing else helps, i need the application to have a look at it myself.