3
$\begingroup$

I'm wondering whether some of you would have tested and seen quite a difference in using a compressed texture even when the OpenGL environment does not need saving any memory (i.e. the card has more memory than necessary to support the textures uncompressed.)

I'm thinking that a compressed texture would use less RAM and thus reading it and decompressing in the GPU would be faster because the number of memory accesses is lower. Whereas, a non-compressed texture would rely more on memory access (GPU I/O) than processing and that is likely slower.

The main things I've read about texture compression has been about how the compression saves space. Not so much about how it can save execution time with the GPU. (Note that I specifically will be using an nVidia, Pascal for now. But I would hope that it works similarly whatever the GPU.)

$\endgroup$
  • 1
    $\begingroup$ Based on opeGLES (mobile) i have benchmarked compressed textures (ETC1) to be faster than their RGB888 equivalents, I guess this is, as you say, due to lower memory bandwidth. $\endgroup$ – PaulHK May 4 '18 at 2:15
  • $\begingroup$ It's going to be a trade off depending on whether you are memory bound or not. $\endgroup$ – ratchet freak May 4 '18 at 11:09
4
$\begingroup$

Because memory bandwidth is not free.

No matter how much RAM you have, it takes less time to read 1024 bytes than it does to read 1024 KB. Compressed textures, relative to 32-bpp, can offer compression ratios of 4:1 or better. That's at least one quarter of the memory bandwidth costs of fetching the texture.

If your rendering uses lots of textures, reducing bandwidth pressure can improve performance.

Alternatively, the more memory you have available, the more memory you can use. If you consider 1GB to be "plenty of memory", then using compressed textures allows you to store the equivalent of maybe 2-3GB worth of textures. So now your textures can be larger, more detailed, or more varied, all within the same "plenty of memory" space. Or you can use some of that reclaimed storage for more meshes.

There's never enough memory; there's only a question of how much you're willing/able to use.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.