[Bf-blender-cvs] [4e90266fd8c] blender-v2.92-release: Tests: enable bake and shader raytracing tests for OptiX

Brecht Van Lommel noreply at git.blender.org
Thu Jan 14 13:20:29 CET 2021


Commit: 4e90266fd8c06214f2dfc2c84d4be8f8c24c532f
Author: Brecht Van Lommel
Date:   Thu Jan 14 12:04:09 2021 +0100
Branches: blender-v2.92-release
https://developer.blender.org/rB4e90266fd8c06214f2dfc2c84d4be8f8c24c532f

Tests: enable bake and shader raytracing tests for OptiX

These are now supported and so can be tested.

Also refactor the code a bit to move Cycles specific blacklist out of generic
render test code.

===================================================================

M	tests/python/cycles_render_tests.py
M	tests/python/modules/render_report.py

===================================================================

diff --git a/tests/python/cycles_render_tests.py b/tests/python/cycles_render_tests.py
index 9153a2732b5..95bc874300d 100644
--- a/tests/python/cycles_render_tests.py
+++ b/tests/python/cycles_render_tests.py
@@ -9,6 +9,53 @@ import subprocess
 import sys
 from pathlib import Path
 
+# List of .blend files that are known to be failing and are not ready to be
+# tested, or that only make sense on some devices. Accepts regular expressions.
+BLACKLIST_OSL = [
+    # OSL only supported on CPU.
+    '.*_osl.blend',
+    'osl_.*.blend',
+]
+
+BLACKLIST_OPTIX = [
+    # No branched path on Optix.
+    'T53854.blend',
+    'T50164.blend',
+    'portal.blend',
+    'denoise_sss.blend',
+    'denoise_passes.blend',
+    'distant_light.blend',
+    'aov_position.blend',
+    'subsurface_branched_path.blend',
+    'T43865.blend',
+]
+
+BLACKLIST_GPU = [
+    # Missing equiangular sampling on GPU.
+    'area_light.blend',
+    'denoise_hair.blend',
+    'point_density_.*.blend',
+    'point_light.blend',
+    'shadow_catcher_bpt_.*.blend',
+    'sphere_light.blend',
+    'spot_light.blend',
+    'T48346.blend',
+    'world_volume.blend',
+    # Uninvestigated differences with GPU.
+    'image_log.blend',
+    'subsurface_behind_glass_branched.blend',
+    'T40964.blend',
+    'T45609.blend',
+    'T48860.blend',
+    'smoke_color.blend',
+    'bevel_mblur.blend',
+    # Inconsistency between Embree and Hair primitive on GPU.
+    'hair_basemesh_intercept.blend',
+    'hair_instancer_uv.blend',
+    'hair_particle_random.blend',
+    'principled_hair_.*.blend',
+    'transparent_shadow_hair.*.blend',
+]
 
 def get_arguments(filepath, output_filepath):
     dirname = os.path.dirname(filepath)
@@ -64,8 +111,15 @@ def main():
     output_dir = args.outdir[0]
     device = args.device[0]
 
+    blacklist = []
+    if device != 'CPU':
+        blacklist += BLACKLIST_GPU
+        blacklist += BLACKLIST_OSL
+    if device == 'OPTIX':
+        blacklist += BLACKLIST_OPTIX
+
     from modules import render_report
-    report = render_report.Report('Cycles', output_dir, idiff, device)
+    report = render_report.Report('Cycles', output_dir, idiff, device, blacklist)
     report.set_pixelated(True)
     report.set_reference_dir("cycles_renders")
     if device == 'CPU':
diff --git a/tests/python/modules/render_report.py b/tests/python/modules/render_report.py
index 9db2162b1ff..c1ae0b05fcd 100755
--- a/tests/python/modules/render_report.py
+++ b/tests/python/modules/render_report.py
@@ -29,57 +29,6 @@ class COLORS_DUMMY:
 COLORS = COLORS_DUMMY
 
 
-# List of .blend files that are known to be failing and are not ready to be
-# tested, or that only make sense on some devices. Accepts regular expressions.
-BLACKLIST = (
-    # OSL only supported on CPU.
-    ('.*_osl.blend', '(?!CPU)'),
-    ('osl_.*.blend', '(?!CPU)'),
-
-    # No baking, branched path and shader raytrace on Optix.
-    ('bake_.*.blend', 'OPTIX'),
-    ('ambient_occlusion.blend', 'OPTIX'),
-    ('ambient_occlusion_only_local.blend', 'OPTIX'),
-    ('bevel.blend', 'OPTIX'),
-    ('bevel_mblur.blend', 'OPTIX'),
-    ('T53854.blend', 'OPTIX'),
-    ('T50164.blend', 'OPTIX'),
-    ('portal.blend', 'OPTIX'),
-    ('denoise_sss.blend', 'OPTIX'),
-    ('denoise_passes.blend', 'OPTIX'),
-    ('distant_light.blend', 'OPTIX'),
-    ('aov_position.blend', 'OPTIX'),
-    ('subsurface_branched_path.blend', 'OPTIX'),
-
-    # Missing equiangular sampling on GPU.
-    ('area_light.blend', '(?!CPU)'),
-    ('denoise_hair.blend', '(?!CPU)'),
-    ('point_density_.*.blend', '(?!CPU)'),
-    ('point_light.blend', '(?!CPU)'),
-    ('shadow_catcher_bpt_.*.blend', '(?!CPU)'),
-    ('sphere_light.blend', '(?!CPU)'),
-    ('spot_light.blend', '(?!CPU)'),
-    ('T48346.blend', '(?!CPU)'),
-    ('world_volume.blend', '(?!CPU)'),
-
-    # Inconsistency between Embree and Hair primitive on GPU.
-    ('hair_basemesh_intercept.blend', '(?!CPU)'),
-    ('hair_instancer_uv.blend', '(?!CPU)'),
-    ('hair_particle_random.blend', '(?!CPU)'),
-    ('principled_hair_.*.blend', '(?!CPU)'),
-    ('transparent_shadow_hair.*.blend', '(?!CPU)'),
-
-    # Uninvestigated differences with GPU.
-    ('image_log.blend', '(?!CPU)'),
-    ('subsurface_behind_glass_branched.blend', '(?!CPU)'),
-    ('T40964.blend', '(?!CPU)'),
-    ('T45609.blend', '(?!CPU)'),
-    ('T48860.blend', '(?!CPU)'),
-    ('smoke_color.blend', '(?!CPU)'),
-    ('T43865.blend', 'OPTIX')
-)
-
-
 def print_message(message, type=None, status=''):
     if type == 'SUCCESS':
         print(COLORS.GREEN, end="")
@@ -103,7 +52,7 @@ def print_message(message, type=None, status=''):
     sys.stdout.flush()
 
 
-def blend_list(dirpath, device):
+def blend_list(dirpath, device, blacklist):
     import re
 
     for root, dirs, files in os.walk(dirpath):
@@ -112,12 +61,10 @@ def blend_list(dirpath, device):
                 continue
 
             skip = False
-            for blacklist in BLACKLIST:
-                if not re.match(blacklist[0], filename):
-                    continue
-                if device and blacklist[1] and not re.match(blacklist[1], device):
-                    continue
-                skip = True
+            for blacklist_entry in blacklist:
+                if re.match(blacklist_entry, filename):
+                    skip = True
+                    break
 
             if not skip:
                 filepath = os.path.join(root, filename)
@@ -169,10 +116,11 @@ class Report:
         'passed_tests',
         'compare_tests',
         'compare_engine',
-        'device'
+        'device',
+        'blacklist',
     )
 
-    def __init__(self, title, output_dir, idiff, device=None):
+    def __init__(self, title, output_dir, idiff, device=None, blacklist=[]):
         self.title = title
         self.output_dir = output_dir
         self.global_dir = os.path.dirname(output_dir)
@@ -182,6 +130,7 @@ class Report:
         self.fail_threshold = 0.016
         self.fail_percent = 1
         self.device = device
+        self.blacklist = blacklist
 
         if device:
             self.title = self._engine_title(title, device)
@@ -575,7 +524,7 @@ class Report:
     def _run_all_tests(self, dirname, dirpath, blender, arguments_cb, batch):
         passed_tests = []
         failed_tests = []
-        all_files = list(blend_list(dirpath, self.device))
+        all_files = list(blend_list(dirpath, self.device, self.blacklist))
         all_files.sort()
         print_message("Running {} tests from 1 test case." .
                       format(len(all_files)),



More information about the Bf-blender-cvs mailing list