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.
This commit is contained in:
@@ -9,6 +9,53 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
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):
|
def get_arguments(filepath, output_filepath):
|
||||||
dirname = os.path.dirname(filepath)
|
dirname = os.path.dirname(filepath)
|
||||||
@@ -64,8 +111,15 @@ def main():
|
|||||||
output_dir = args.outdir[0]
|
output_dir = args.outdir[0]
|
||||||
device = args.device[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
|
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_pixelated(True)
|
||||||
report.set_reference_dir("cycles_renders")
|
report.set_reference_dir("cycles_renders")
|
||||||
if device == 'CPU':
|
if device == 'CPU':
|
||||||
|
@@ -29,57 +29,6 @@ class COLORS_DUMMY:
|
|||||||
COLORS = 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=''):
|
def print_message(message, type=None, status=''):
|
||||||
if type == 'SUCCESS':
|
if type == 'SUCCESS':
|
||||||
print(COLORS.GREEN, end="")
|
print(COLORS.GREEN, end="")
|
||||||
@@ -103,7 +52,7 @@ def print_message(message, type=None, status=''):
|
|||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
|
||||||
def blend_list(dirpath, device):
|
def blend_list(dirpath, device, blacklist):
|
||||||
import re
|
import re
|
||||||
|
|
||||||
for root, dirs, files in os.walk(dirpath):
|
for root, dirs, files in os.walk(dirpath):
|
||||||
@@ -112,12 +61,10 @@ def blend_list(dirpath, device):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
skip = False
|
skip = False
|
||||||
for blacklist in BLACKLIST:
|
for blacklist_entry in blacklist:
|
||||||
if not re.match(blacklist[0], filename):
|
if re.match(blacklist_entry, filename):
|
||||||
continue
|
skip = True
|
||||||
if device and blacklist[1] and not re.match(blacklist[1], device):
|
break
|
||||||
continue
|
|
||||||
skip = True
|
|
||||||
|
|
||||||
if not skip:
|
if not skip:
|
||||||
filepath = os.path.join(root, filename)
|
filepath = os.path.join(root, filename)
|
||||||
@@ -169,10 +116,11 @@ class Report:
|
|||||||
'passed_tests',
|
'passed_tests',
|
||||||
'compare_tests',
|
'compare_tests',
|
||||||
'compare_engine',
|
'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.title = title
|
||||||
self.output_dir = output_dir
|
self.output_dir = output_dir
|
||||||
self.global_dir = os.path.dirname(output_dir)
|
self.global_dir = os.path.dirname(output_dir)
|
||||||
@@ -182,6 +130,7 @@ class Report:
|
|||||||
self.fail_threshold = 0.016
|
self.fail_threshold = 0.016
|
||||||
self.fail_percent = 1
|
self.fail_percent = 1
|
||||||
self.device = device
|
self.device = device
|
||||||
|
self.blacklist = blacklist
|
||||||
|
|
||||||
if device:
|
if device:
|
||||||
self.title = self._engine_title(title, 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):
|
def _run_all_tests(self, dirname, dirpath, blender, arguments_cb, batch):
|
||||||
passed_tests = []
|
passed_tests = []
|
||||||
failed_tests = []
|
failed_tests = []
|
||||||
all_files = list(blend_list(dirpath, self.device))
|
all_files = list(blend_list(dirpath, self.device, self.blacklist))
|
||||||
all_files.sort()
|
all_files.sort()
|
||||||
print_message("Running {} tests from 1 test case." .
|
print_message("Running {} tests from 1 test case." .
|
||||||
format(len(all_files)),
|
format(len(all_files)),
|
||||||
|
Reference in New Issue
Block a user