5 Replies Latest reply on Aug 10, 2018 4:28 PM by spaceengineer

    OpanGL GL_ATI_meminfo replacement?

    spaceengineer

      Hi there! I am SpaceEngine simulator developer. You can download it for free at http://spaceengine.org

       

      SpaceEngine is based on OpenGL. It uses aggressive video memory management, by occupying all available VRAM for its resources (procedurally generated textures and VBOs). Thus I need to know total VRAM size and current available amount. Some years ago there was extension GL_ATI_meminfo, which did the work, but now it is not available. How do I query available VRAM now on AMD? No problem with NVidia (GL_NVX_gpu_memory_info extension).

       

      Interesting fact: despite on the fact that GL_ATI_meminfo is not available, its constants like GL_TEXTURE_FREE_MEMORY_ATI are still present and works (I'm using GLEW to access extensions). This query returns believable values, but generates GL_INVALID_ENUM:

       

      GLint mem[4] = { 0, 0, 0, 0 };

      glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, &mem[0]);

       

      It seems that functionality is still in the driver, but was somehow removed (not completely) from OpenGL implementation. Any chance to get is back to work? Or maybe some replacement extension / API exists? Thanks for advice!

       

      PS: I have RX 580 8 GB, Windows 7, but stuck at driver 17.12.2, because newer drivers produces heavy lags on the whole system every 3-5 seconds. This is known issue for which I didn't found solution as well.