3 ms·
I think you missed the real point: Textures stored on the SSDs is now byte addressable by the texturing unit on the GPU. When the texturing unit issue a read fo
by russli1993 6y ago
I think you missed the real point: Textures stored on the SSDs is now byte addressable by the texturing unit on the GPU. When the texturing unit issue a read for texture data, the read can now go directly to the SSD controller, and SSD controller issue NVMe commands to read the data. The texture decompression block sits between the GPU and SSD controller, decompresses the texture at line speed. This way, the GPU can read the texture at the exact detail levels given by the amount of pixels covered by the texture. It gives a texture infinite mips level. The GPU can also place the texture data needed for the current frame in the GPU memory, GPU memory becomes more like a cache for textures. This reduce GPU memory usage. Imagine you want to render a camera flying through a forest. Before you need the texture for the trees and have multiple version of them for far away trees and nearby trees. As the camera flies over, you transition from the low detail texture to the most detailed texture. That is why you see the texture pop in in today's games. Going forward, you just need the most detailed texture, and have the GPU automatically sample the texture according to the pixel needs to be rendered. There will be no stepping in between, it will be continuous. This solves texture pop in at a fundamental level.
Another benefit is reduce CPU involvement. Textures are fundamentally stored on disk, and GPU needs to access that data for rendering. Before we would have the CPU use OS's filesystem storage stack, read a file block, decode the texture in CPU memory, copy the texture to GPU memory using PCI-e, and ask the GPU to render with that data. This method allows the GPU directly read from a SSD, bypassing all of the steps in between. As SSD becomes faster and faster, OS's filesystem is becoming the bottleneck.
- brigade 6y ago> GPU directly read from a SSD, bypassing all of the steps in between Ehh... unless you have more specific knowledge that’s still under NDA, the reasonable assumption is that the CPU still mmap()es the file into the GPU’s address space, and then the CPU pages in data from the SSD as the GPU generates page misses. Which is technically possible on PCs today, but isn’t done because you can’t assume fast SSDs and you definitely can’t assume shared memory. (actually I’m pretty sure discrete GPUs can generate page misses for mapped CPU memory, but I’m not certain which graphics APIs really let that happen)
- vardump 6y agoBetter be at least 2 MB pages then. 5.5M (max. 22 GB/s compression output on PS5) page faults per second for 4 kB pages might otherwise ruin this scheme a bit... 2 MB page size would reduce this to "just" 11k page faults per second.
- throwaway_pdp09 6y agoI know nothing about this, but wouldn't most textures be quite small, and with a large page size you might end up reading in much more than you need, making it often worse than useless?
- 67868018 6y agoTransparent superpages solve this http://u.cs.biu.ac.il/~wiseman/2os/superpage/navaroo1.pdf http://u.cs.biu.ac.il/~wiseman/2os/superpage/navaroo1.pdf
- throwaway_pdp09 6y agoThat's 113 pages, does this really cover the issue of reading too much? IF so, I'll try and find the time. I mean I'm not complaining about TLB issues which large pages do better at for obvious reasons, but thrashing the TLB is likely to be a lot cheaper than reading too much from the disk.
- 67868018 6y agoFreeBSD superpage max size on amd64 is 1GB edit: and there have been SPARC CPUs with memory controllers that can do 256GB pages
- DudeInBasement 6y agoYou do realize the GPU can just read it from the physical address space and not via the CPUs MMU. It's not an innovation. There is still a lot of level3 Bus transactions. If the SSD had two buses, with 1 directly to the GPU (read only type) there would be less pressure on the level3 bus and that would speed things up.
- rasz 6y agoTexture streaming is a thing in current gen https://www.youtube.com/watch?v=mvdTtl27TpM https://www.youtube.com/watch?v=mvdTtl27TpM