summaryrefslogtreecommitdiffstats
path: root/src/util/ati_meminfo.c (plain)
blob: 789da263c100030889aba1b53148654611e89aca
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#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 kilobytes\n", param[0]);
  printf ("  Largest available free block in the pool: %i kilobytes\n",
	  param[1]);
  printf ("  Total auxiliary memory free: %i kilobytes\n", param[2]);
  printf ("  Largest auxiliary free block: %i kilobytes\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 kilobytes\n", param[0]);
  printf ("  Largest available free block in the pool: %i kilobytes\n",
	  param[1]);
  printf ("  Total auxiliary memory free: %i kilobytes\n", param[2]);
  printf ("  Largest auxiliary free block: %i kilobytes\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 kilobytes\n", param[0]);
  printf ("  Largest available free block in the pool: %i kilobytes\n",
	  param[1]);
  printf ("  Total auxiliary memory free: %i kilobytes\n", param[2]);
  printf ("  Largest auxiliary free block: %i kilobytes\n", param[3]);
  printf ("\n");

  return;
}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.