1

I just came across the resident textures but I did not get how to use them. Why do we have this extension, is it for performance improvement? As we can check before using them if they are resident, we need to call the after glTEximage call? What would be the use-case for this?

debonair
  • 2,505
  • 4
  • 33
  • 73
  • [`ARB_sparse_texture`](http://www.opengl.org/registry/specs/ARB/sparse_texture.txt) or plain 'ole `glAreTexturesResident()`? – genpfault Mar 23 '14 at 09:12
  • possible duplicate of [Resident textures?](http://stackoverflow.com/questions/11960014/resident-textures) – j-p Mar 23 '14 at 10:07
  • 1
    Back when VRAM was considerably smaller, textures were swapped in-and-out out of necessity. You could check whether a texture was part of the "working set" before issuing a draw command with this, which could potentially allow you to do things like re-order some draw operations to reduce thrashing. Likewise, some implementations would defer the process of moving image data from client memory to server memory until first use, and `glAreTexturesResident (...)` could be used to detect this kind of behavior. It is utterly useless these days, and not even a part of the modern OpenGL API. – Andon M. Coleman Mar 23 '14 at 23:47
  • 1
    Since you mentioned an extension, and I do not think you are referring to the texture objects extension (GL 1.1), I imagine what you are actually referring to are ***Partially Resident Textures*** (where portions of a texture may be managed like virtual memory, rather than either being completely resident or non-resident). Can you clarify exactly what you are talking about? – Andon M. Coleman Mar 23 '14 at 23:51
  • @Andon M. Coleman Not utterly useless; in cases where OpenGL is [preferred](https://stackoverflow.com/a/24510995) for certain GPGPU applications, texture residence would be a [crude way](https://stackoverflow.com/a/4553146) (fixed link) to estimate the amount of working VRAM available, which can be used to tune an algorithm with a time/space trade-off (e.g. equihash); RAM->VRAM transfers may be fast but they [aren't free](https://linustechtips.com/main/topic/453414-vram-vs-ddr4/). –  Sep 10 '17 at 15:25

0 Answers0