summaryrefslogtreecommitdiffstats
Side-by-side diff
-rw-r--r--src/Makefile.am2
-rw-r--r--src/model/exp004state.h2
-rw-r--r--src/model/map_geometry.c2
-rw-r--r--src/util/ati_meminfo.c39
-rw-r--r--src/util/ati_meminfo.h11
5 files changed, 54 insertions, 2 deletions
diff --git a/src/util/ati_meminfo.c b/src/util/ati_meminfo.c
new file mode 100644
index 0000000..205d432
--- a/dev/null
+++ b/src/util/ati_meminfo.c
@@ -0,0 +1,39 @@
+#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;
+}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.