rusty_shackleford
Arcane
- Joined
- Jan 14, 2018
- Messages
- 50,754
they do, but there's also a lot of synchronization that is required to happen --both ways, a lot of things requiring reading back from the GPU, it's not merely telling it what to render -- , and GPU<->CPU synchronization is (relatively) very slow so the win is still there but not as big as it would seem at first.Why isn't anyone doing render() and update() in parallel through triple buffering? For Fallout-like games, there are very few kinds of entities (critter, floor, wall, roof, scenery, bullet, light, etc.) and isolating the parts that are needed for rendering isn't too difficult. Then it can run two threads in parallel:
update loop:
- process input
- do entities
- copy render state to shared buffer
render loop:
- get render state from shared buffer
- push triangles
Then both loops can individually take 15 ms and still push 60 Hz to the display.
some examples of things that require reading back from the GPU include occlusion queries and scene picking, I don't think too many -- if any -- techniques rely upon transform feedback nowadays, probably due to how much of a bottleneck synchronization points became.
UE5 is source-available, get access to it and read through the code, it uses a separate thread exclusively for the renderer.