diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-02-19 16:31:02 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-02-19 16:31:02 +0300 |
commit | 446625c5610577a6a708b7550d93bd760c4fa2d5 (patch) | |
tree | d8dfdbaba6913b0523fe8c63816729a384e38ddb /source/blender/gpu | |
parent | c8b7e7973af3d4675b0076103a727961e8c83ccc (diff) |
Clay Engine: Use G.debug_value to test cache performance
Use debug 666 for cache without instance buffer caching.
Use debug 667 for cache with instance buffer caching.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_viewport.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c index a189f6770a0..c8e60c089d3 100644 --- a/source/blender/gpu/intern/gpu_viewport.c +++ b/source/blender/gpu/intern/gpu_viewport.c @@ -38,6 +38,8 @@ #include "DNA_vec_types.h" +#include "BKE_global.h" + #include "GPU_framebuffer.h" #include "GPU_glew.h" #include "GPU_immediate.h" @@ -115,11 +117,11 @@ void GPU_viewport_bind(GPUViewport *viewport, const rcti *rect, const char *engi /* add one pixel because of scissor test */ int rect_w = BLI_rcti_size_x(rect) + 1, rect_h = BLI_rcti_size_y(rect) + 1; -#ifndef WITH_VIEWPORT_CACHE_TEST - /* TODO for testing only, we need proper cache invalidation */ - GPU_viewport_passes_free(viewport->psl); - GPU_viewport_passes_free(viewport->psl_mode); -#endif + if (G.debug_value != 666 && G.debug_value != 667) { + /* TODO for testing only, we need proper cache invalidation */ + GPU_viewport_passes_free(viewport->psl); + GPU_viewport_passes_free(viewport->psl_mode); + } if (!STREQ(engine, viewport->engine_name)) { GPU_viewport_storage_free(viewport->stl); |