Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2010-11-17 08:28:25 +0300
committerMitchell Stokes <mogurijin@gmail.com>2010-11-17 08:28:25 +0300
commit1bb98b41944dadf69645cf3b99bcabd9834f9240 (patch)
tree5c700ba234517211190bf7865c0ee7a353475b94 /source/blender/gpu/GPU_extensions.h
parentf791d74f102dcfed69a95d605e3c634f76a070ab (diff)
Adding monitoring for (approximate) VRAM used by textures. The information is currently only used in the profiling data of the BGE.
Here is a image of it in action: http://www.pasteall.org/pic/show.php?id=6351 What it monitors: * VRAM used by textures created via bf_gpu and BL_Textures What it does not monitor: * VRAM used by the Blender ui * VRAM used by 2d filters * VRAM allocated by the user via KX_Scene.pre_draw and KX_Scene.pre_draw
Diffstat (limited to 'source/blender/gpu/GPU_extensions.h')
-rw-r--r--source/blender/gpu/GPU_extensions.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h
index a7f43d3b0ae..d545a553da9 100644
--- a/source/blender/gpu/GPU_extensions.h
+++ b/source/blender/gpu/GPU_extensions.h
@@ -104,6 +104,10 @@ int GPU_type_matches(GPUDeviceType device, GPUOSType os, GPUDriverType driver);
- if created with from_blender, will not free the texture
*/
+unsigned int GPU_texture_vram_usage(void);
+void GPU_texture_vram_add(unsigned int amount);
+void GPU_texture_vram_subtract(unsigned int amount);
+
GPUTexture *GPU_texture_create_1D(int w, float *pixels);
GPUTexture *GPU_texture_create_2D(int w, int h, float *pixels);
GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels);