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:
authorClément Foucault <foucault.clem@gmail.com>2021-10-05 10:36:11 +0300
committerJeroen Bakker <jeroen@blender.org>2021-10-05 10:39:54 +0300
commit1d49293b80446b89b5b12fa0eeefaf14e5051e48 (patch)
tree72e007ea9d498576ad9b48050f81f38994aa0d98 /source/blender/draw/intern/draw_manager_profiling.c
parent08511b1c3de0338314940397083adaba4e9cf492 (diff)
DRW: Move buffer & temp textures & framebuffer management to DrawManager
This is a necessary step for EEVEE's new arch. This moves more data to the draw manager. This makes it easier to have the render or draw engines manage their own data. This makes more sense and cleans-up what the GPUViewport holds Also rewrites the Texture pool manager to be in C++. This also move the DefaultFramebuffer/TextureList and the engine related data to a new `DRWViewData` struct. This struct manages the per view (as in stereo view) engine data. There is a bit of cleanup in the way the draw manager is setup. We now use a temporary DRWData instead of creating a dummy viewport. Development: fclem, jbakker Differential Revision: https://developer.blender.org/D11966
Diffstat (limited to 'source/blender/draw/intern/draw_manager_profiling.c')
-rw-r--r--source/blender/draw/intern/draw_manager_profiling.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/draw/intern/draw_manager_profiling.c b/source/blender/draw/intern/draw_manager_profiling.c
index d9ba2cbf932..70fe12270f5 100644
--- a/source/blender/draw/intern/draw_manager_profiling.c
+++ b/source/blender/draw/intern/draw_manager_profiling.c
@@ -257,10 +257,9 @@ void DRW_stats_draw(const rcti *rect)
/* Engines rows */
char time_to_txt[16];
- LISTBASE_FOREACH (LinkData *, link, &DST.enabled_engines) {
+ DRW_ENABLED_ENGINE_ITER(DST.view_data_active, engine, data)
+ {
u = 0;
- DrawEngineType *engine = link->data;
- ViewportEngineData *data = drw_viewport_engine_data_ensure(engine);
draw_stat_5row(rect, u++, v, engine->idname, sizeof(engine->idname));
@@ -297,7 +296,7 @@ void DRW_stats_draw(const rcti *rect)
v += 2;
u = 0;
- double *cache_time = GPU_viewport_cache_time_get(DST.viewport);
+ double *cache_time = DRW_view_data_cache_time_get(DST.view_data_active);
sprintf(col_label, "Cache Time");
draw_stat_5row(rect, u++, v, col_label, sizeof(col_label));
sprintf(time_to_txt, "%.2fms", *cache_time);