diff options
author | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-21 00:24:02 +0000 |
---|---|---|
committer | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-21 00:24:02 +0000 |
commit | 631e6c9be8dafc728e29e0f2d4fec6851a697992 (patch) | |
tree | dfa3cb84204049470298f3191a35231ba9d8599c /third_party/mesa | |
parent | f6755427f98106ec1f7c5a9f538f64c13a4a6902 (diff) | |
download | chromium_src-631e6c9be8dafc728e29e0f2d4fec6851a697992.zip chromium_src-631e6c9be8dafc728e29e0f2d4fec6851a697992.tar.gz chromium_src-631e6c9be8dafc728e29e0f2d4fec6851a697992.tar.bz2 |
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@157879 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/mesa')
-rw-r--r-- | third_party/mesa/MesaLib/include/GL/glext.h | 7 | ||||
-rw-r--r-- | third_party/mesa/README.chromium | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/third_party/mesa/MesaLib/include/GL/glext.h b/third_party/mesa/MesaLib/include/GL/glext.h index 77335bd..653e4fd 100644 --- a/third_party/mesa/MesaLib/include/GL/glext.h +++ b/third_party/mesa/MesaLib/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 /*************************************************************/ diff --git a/third_party/mesa/README.chromium b/third_party/mesa/README.chromium index db954fd..32fee68 100644 --- a/third_party/mesa/README.chromium +++ b/third_party/mesa/README.chromium @@ -113,3 +113,5 @@ Later modifications (see chromium.patch): http://code.google.com/p/chromium/issues/detail?id=142316 - Fix the compile errors on Android + +- Added constants for GL_NVX_gpu_memory_info to glext.h |