summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-21 00:24:02 +0000
committerccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-21 00:24:02 +0000
commit0b0b2962598af6d7e9e0b68acdd79123203a8553 (patch)
treebed080fce1d8cca52a8ef40f8924bb3a3dae805f
parentd85c12dfb72ccb6e7447b8d20bfb4c61117a6d13 (diff)
downloadsrc-0b0b2962598af6d7e9e0b68acdd79123203a8553.tar.gz
Get real GPU memory values on NV+Linux and OS X. Add an interface to GLContext to query the GPU's total video memory.
Note that this is the amount of video memory on the currently-rendering GPU, so different contexts will give different values, and the same context may give different values over time (for instance, on a Macbook Pro with graphics switching). Of note is that on a Macbook Pro with graphics switching enabled, the contexts don't move together between GPUs -- some stay on the integrated GPU while others use the discrete GPU. BUG=132994 Review URL: https://chromiumcodereview.appspot.com/10957009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src/third_party/mesa/MesaLib@157879 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--include/GL/glext.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/GL/glext.h b/include/GL/glext.h
index 77335bd..653e4fd 100644
--- a/include/GL/glext.h
+++ b/include/GL/glext.h
@@ -5019,6 +5019,13 @@ extern "C" {
#ifndef GL_AMD_transform_feedback3_lines_triangles
#endif
+#ifndef GL_NVX_gpu_memory_info
+#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047
+#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048
+#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049
+#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A
+#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B
+#endif
/*************************************************************/