4 ms·
> The reality is even cutting edge games and consumer workloads don’t actually take full use of the PCIe bandwidth of the GPU or the bandwidth of its GDDR memor
by maccard 4mo ago
> The reality is even cutting edge games and consumer workloads don’t actually take full use of the PCIe bandwidth of the GPU or the bandwidth of its GDDR memory
Game dev here. For anyone reading this - it’s not because we’re lazy, it’s because _it’s really hard to do_.
One of the biggest differences between the current generation consoles and the current gen PCs is unified memory.
- BuyMyBitcoins 4mo agoHow much of that difficulty comes from the chosen game engine? I assume the engine is the primary factor in how resources are allocated.
- keyringlight 4mo agoOne related question that you need to follow that with is the associated costs of switching the whole studio to another engine that's technically better, or if proposing teach studio tailor-make their own engine the costs of that engineering, if presumably they have or learn the expertise to surpass whatever they're using currently. I'm not a game developer, but it would also seem to be a link between resource usage by the engine, and whatever content the production side are making. For all the commentary about how brilliant the id software engines are, if you examine the levels you pass through they're also very efficient with what they demand out of the engine - it's like an orchestra playing well together, not one instrument that means you can do anything.
- maccard 4mo agoBoth lots and none at the same time. The engines definitely make decisions for you but with unreal (for example) you can modify the RDG any way you see fit. The problem is that when you need something in gpu you have to go through RAM first (unless you have DMA which is a more recent addition). That doesn’t just add latency it also adds an extra step of cache invalidation, so you have to plan for that from the highest level of gameplay. If you need to prepare for a GPU memory miss _and_ a CPU memory miss as a worst case all the time, it’s very hard to make good use of the bandwidth in the best case
- nearbuy 4mo agoI think much of the difficulty is just that, for example, the 1.8 TB/s of an RTX 5090 is a lot of bandwidth for a game to use. That's over 50,000 4k textures per second at 32bpp.
- gmueckl 4mo agoThat sounds like a lot, but: modern renderers do between 20 to 40 passes, many of them in screen space. And each screen space pass typically reads from at least two input images, sometimes 3 or 4 even with optimally packed inputs. At 60fps that can quickly get up to way over 2000 full screen buffer reads per second and more for less than optimal access patterns in some algorithms. That also doesn't account for texture access during shading passes, which are somewhat random memory accesses.
- nearbuy 4mo agoVery true, but I'll point out that even those 2000 full screen reads per second at 4k are only 4% of the 5090's bandwidth. Sacrificing some of that speed for a unified memory architecture seems like a good trade. Plus, DLSS can greatly reduce the bandwidth requirements for 4K gaming.
- gmueckl 4mo agoI'm being very, very conservative with my estimates here. Based on the renderers I know, I could have easily tweaked the numbers to go up to 8000 full screen texture reads per second. That doesn't include texture or geometry or BVH reads or any memory writes. That is all in addition to those operations.
- Stevvo 4mo agoWhat? It's incredibly easy to take full use of memory bandwidth. For example, put proper volumetric smoke/fire/explosion sim in your game. But game developers don't do that because they are lazy.
- maccard 4mo agoNo, we don’t do it because the tradeoff isn’t worth it. A gpu based particle sim is very difficult to do well - it’s easy (but computationally expensive) to do a volumetric sim, but when you want that simulation to interact with world geometry correctly it comes with an explosion in complexity and performance. I promise you want our games to look as good as you want them to look.
- Stevvo 4mo agoHow does interaction with world geometry come with an explosion in complexity and performance? Advection has almost same cost regardless of if some cells are solid or not. It's one extra line in your shader + 1 bit per cell. JFA to build solid mask.
- stego-tech 4mo agoI live with a game dev myself, so I get it. Hell, it's hard even for PC developers who want to do things without leaning on abstraction layers or existing engines. Managing multiple discrete memory pools, asset swaps or calls between them, getting the respective subsystems to exchange data at just the right time so as not to impact other code and drag down performance - it's fucking hard in general. A unified pool of memory suddenly makes that simultaneously easier, but also far more flexible, which frees up developer time and bandwidth to focus on other, more important tasks.