![]() Looking at MSDN docs, it’s defined as (emphasis added by me): I spotted that some (not all) locks are done with aĭ3DLOCK_DISCARD flag. Let’s take another look at vertex buffer locks though. I set up verification, and… nothing ¯\_(ツ)_/¯ Theory debunked. If they are done from multiple threads, it could be a possible culprit. That all calls to IDirect3DVertexBuffer9::Lock and IDirect3DVertexBuffer9::Unlock are done from the same thread. That theory is trivial to confirm or debunk via a DX9 wrapper. ![]() That the issue is a classic race condition – which also would explain why it looks different every time.Ĭonceptually, it also makes sense – game could be loading models on multiple threads, setting up D3D resourcesĬoncurrently and I imagine that failing to do so in a thread safe manner could result in artifacts looking like that. To mention that people thought this issue shows up only on multicore CPU’s. I theoretized that this issue relates to vertex buffers not updating properly. I have seen variations where most of the environment was not corrupted, but people were T-posing. Results vary every session, and on some machines it might even look very different – for example,.This means that at least part of this garbage is in fact Tony’s model. When in game, moving around makes those shapes move, possibly corresponding player character’s animations.That’s where experience helps, so I was able to come up with theoriesīy just observing how the bug looks visually: That said, this issue could really be anything. Since it allows me to instantly and reliably tap into game’s rendering code without any game specific hacking. Having a minimal d3d9.dll wrapper is excellent for prototyping, Specific to D3D, I aided myself with DirectX Wrappersįrom Elisha Riedlinger. Step one to figuring out such issues is of course attaching a debugger. However, we want to know what exactly went wrong, so those aren’t enough – armed with a debugger andĪ virtual machine, I can proceed to figuring this issue out. While these might suffice for casual play, neither of these workarounds address the root cause of the issue. Also, having to always run the game through – given PIX is used to collect data, it might introduce additional overhead. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |