Fix: Tests: Two-stage shader compilation in EEVEE performance tests
The EEVEE performance tests wait for shader compilation to finish before beginning to record performance. However, shader compilation can also happen after the first frame. This PR adds a check to the warmup phase to see if shader compilation is still happening. This happens, e.g., for the Mr. Elephant demo scene. Pull Request: https://projects.blender.org/blender/blender/pulls/143690
This commit is contained in:
committed by
Miguel Pozo
parent
aa50de76a7
commit
0cce8536dc
@@ -72,7 +72,10 @@ def frame_change_handler(scene):
|
||||
|
||||
elif record_stage == RecordStage.WARMUP:
|
||||
warmup_frame += 1
|
||||
if time.perf_counter() - start_warmup_time > WARMUP_SECONDS and warmup_frame > WARMUP_FRAMES:
|
||||
# Check for two-stage shader compilation that can happen later than the first frame.
|
||||
if hasattr(bpy.app, 'is_job_running') and bpy.app.is_job_running("SHADER_COMPILATION"):
|
||||
record_stage = RecordStage.WAIT_SHADERS
|
||||
elif time.perf_counter() - start_warmup_time > WARMUP_SECONDS and warmup_frame > WARMUP_FRAMES:
|
||||
start_record_time = time.perf_counter()
|
||||
playback_iteration = 0
|
||||
num_frames = 0
|
||||
|
||||
Reference in New Issue
Block a user