EEVEE: Add shader compilation progress in the viewport
Since rBfa43c47c7cb8446b632a4c0f712162ba615fe51f the progress bar do not show the compilation progress. This was misleading as users could think it could be canceled or prevent rendering. Now we just show how many shaders are still in the compilation queue inside each viewport. This number is more accurate than the percentage that was previously displayed in the progress bar.
This commit is contained in:
parent
9c82c00b32
commit
e2cd5c6748
Notes:
blender-bot
2023-02-14 06:00:45 +01:00
Referenced by issue #102449, Regression: status/percentage indicator (progress bar) of shader compilation is lost
|
@ -141,8 +141,9 @@ void EEVEE_cache_populate(void *vedata, Object *ob)
|
|||
|
||||
static void eevee_cache_finish(void *vedata)
|
||||
{
|
||||
EEVEE_Data *ved = (EEVEE_Data *)vedata;
|
||||
EEVEE_ViewLayerData *sldata = EEVEE_view_layer_data_ensure();
|
||||
EEVEE_StorageList *stl = ((EEVEE_Data *)vedata)->stl;
|
||||
EEVEE_StorageList *stl = ved->stl;
|
||||
EEVEE_PrivateData *g_data = stl->g_data;
|
||||
const DRWContextState *draw_ctx = DRW_context_state_get();
|
||||
const Scene *scene_eval = DEG_get_evaluated_scene(draw_ctx->depsgraph);
|
||||
|
@ -171,6 +172,10 @@ static void eevee_cache_finish(void *vedata)
|
|||
g_data->queued_shaders_count_prev = g_data->queued_shaders_count;
|
||||
EEVEE_temporal_sampling_reset(vedata);
|
||||
}
|
||||
|
||||
if (g_data->queued_shaders_count > 0) {
|
||||
SNPRINTF(ved->info, "Compiling Shaders %d", g_data->queued_shaders_count);
|
||||
}
|
||||
}
|
||||
|
||||
/* As renders in an HDR off-screen buffer, we need draw everything once
|
||||
|
|
Loading…
Reference in New Issue