Here is a simple example of a race condition / threading bug: These kind of bugs can rarely be debugged and take something like 10x the time to fix compared to a normal reproducible bug. Avoiding race conditions is important because they are usually very difficult to reproduce, and may be machine, platform, debugger or configuration dependent because of speed differences. When functional behavior depends on execution speed differences between two threads, it is called a race condition. When dealing with rendering things, you have to carefully consider every memory read and write to ensure not only thread safety, but also determinism in behavior. In Unreal Engine 4 (UE4), the entire renderer operates in its own thread that is a frame or two behind the game thread. Updating state vs Traversing the scene for rendering
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |