11 Replies Latest reply on Jan 18, 2010 12:14 PM by donpellegrino

    GL_AMD_performance_monitor / GL_ATI_meminfo

    donpellegrino

      I find some extensions reported by the ATI non-free Linux drivers that appear to be relevant for performance analysis and profiling of OpenGL applications.  If GL_AMD_performance_monitor and GL_ATI_meminfo can be used to monitor performance or get information on memory they would be very useful.  Are any documentation or headers available for these extensions?

          • GL_AMD_performance_monitor / GL_ATI_meminfo
            donpellegrino

            Thanks for the links.  I added the following function to my program:

            #include "ati_meminfo.h"
            #include <stdio.h>
            #include <GL/glut.h>

            #define VBO_FREE_MEMORY_ATI          0x87FB
            #define TEXTURE_FREE_MEMORY_ATI      0x87FC
            #define RENDERBUFFER_FREE_MEMORY_ATI 0x87FD

            void
            ati_meminfo (void)
            {
              GLint param[4];

              glGetIntegerv (VBO_FREE_MEMORY_ATI, param);
              printf ("VBO_FREE_MEMORY_ATI\n");
              printf ("  Total memory free in the pool: %i Kbyte\n", param[0]);
              printf ("  Largest available free block in the pool: %i Kbyte\n", param[1]);
              printf ("  Total auxiliary memory free: %i Kbyte\n", param[2]);
              printf ("  Largest auxiliary free block: %i Kbyte\n", param[3]);
              printf ("\n");

              glGetIntegerv (TEXTURE_FREE_MEMORY_ATI, param);
              printf ("TEXTURE_FREE_MEMORY_ATI\n");
              printf ("  Total memory free in the pool: %i Kbyte\n", param[0]);
              printf ("  Largest available free block in the pool: %i Kbyte\n", param[1]);
              printf ("  Total auxiliary memory free: %i Kbyte\n", param[2]);
              printf ("  Largest auxiliary free block: %i Kbyte\n", param[3]);
              printf ("\n");

              glGetIntegerv (RENDERBUFFER_FREE_MEMORY_ATI, param);
              printf ("RENDERBUFFER_FREE_MEMORY_ATI\n");
              printf ("  Total memory free in the pool: %i Kbyte\n", param[0]);
              printf ("  Largest available free block in the pool: %i Kbyte\n", param[1]);
              printf ("  Total auxiliary memory free: %i Kbyte\n", param[2]);
              printf ("  Largest auxiliary free block: %i Kbyte\n", param[3]);
              printf ("\n");

              return;
            }

            I am working on an "ATI Mobility Redeon HD 2400 XT" with 128 MB of dedicated DDR3 memory.  Running the function just after creating the OpenGL context with GLUT I was suprised to see the following output:

            VBO_FREE_MEMORY_ATI
              Total memory free in the pool: 86619 Kbyte
              Largest available free block in the pool: 86615 Kbyte
              Total auxiliary memory free: 1535668 Kbyte
              Largest auxiliary free block: 13056 Kbyte

            TEXTURE_FREE_MEMORY_ATI
              Total memory free in the pool: 86619 Kbyte
              Largest available free block in the pool: 86615 Kbyte
              Total auxiliary memory free: 1535668 Kbyte
              Largest auxiliary free block: 13056 Kbyte

            RENDERBUFFER_FREE_MEMORY_ATI
              Total memory free in the pool: 86619 Kbyte
              Largest available free block in the pool: 86615 Kbyte
              Total auxiliary memory free: 1535668 Kbyte
              Largest auxiliary free block: 13056 Kbyte

            I was expecting the pool to be closer to my 128 MB of dedicated memory.  Is there any way to trace where that memory went?

            Also, I am primarilly using display lists to manage my geometry.  Which pool (vertex buffer, texture, render buffer) should I expect display lists to use - or do display lists not take advantage of my dedicated graphics memory?

            • GL_AMD_performance_monitor / GL_ATI_meminfo
              plohrmann

              Hello,

              I just wanted to mention that GPU PerfStudio 2.1 has been made available which adds OpenGL support and includes a very useful Frame Profiler for performance analysis and is based on the GL_AMD_performance_monitor extension. Currently it only supports Windows and not Linux (sorry). I'll see what we can do about adding in a visualization of memory usage to a future release.

              http://developer.amd.com/gpu/PerfStudio/Pages/default.aspx

                • GL_AMD_performance_monitor / GL_ATI_meminfo
                  donpellegrino

                  Thanks for the heads up on GPU PerfStudio 2.1.  The screenshots look very cool.  A Linux version would be very exciting.  If the GUI is already in a cross-platform API and a Linux port could be done I am sure it would be very well received.

                  The ultimate tool would provide a look at resource utilization including stream processors and GPU memory for OpenCL and well as OpenGL profiling.  Even just pure API access via GL_AMD_performance_monitor exentions would go a long way for Linux developers.  As per the previous post, last I checked these functions were not implemented in the Linux libraries.  If they could be added there as a first step that would be great.

                    • GL_AMD_performance_monitor / GL_ATI_meminfo
                      nou

                      nm -D libGL.so | grep Perf
                      000000000007d1f0 T glBeginPerfMonitorAMD
                      000000000007eab0 T glDeletePerfMonitorsAMD
                      000000000007f350 T glEndPerfMonitorAMD
                      000000000007fc90 T glGenPerfMonitorsAMD
                      0000000000080bb0 T glGetPerfMonitorCounterDataAMD
                      0000000000080bd0 T glGetPerfMonitorCounterInfoAMD
                      0000000000080bf0 T glGetPerfMonitorCounterStringAMD
                      0000000000080c10 T glGetPerfMonitorCountersAMD
                      0000000000080c30 T glGetPerfMonitorGroupStringAMD
                      0000000000080c50 T glGetPerfMonitorGroupsAMD
                      00000000000850d0 T glSelectPerfMonitorCountersAMD

                      catalyst 9.12, i have older catalyst. but i do not find it in 9.9. do not know about 9.10 and 9.11