From 4c2fb20e9344ee2fcbc370dc5d5851d4c650d669 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 31 Jan 2025 22:45:56 +0100 Subject: [PATCH] Tests: Fix and workaround Metal difference for Storm * Disable Metal multisampling to match OpenGL. * Block list all image half/float tests, these can all fail randomly. * Blocklist tests failing due to issues in OpenUSD Metal implementation. --- .../render/hydra/render_task_delegate.cc | 4 ++ tests/python/storm_render_tests.py | 50 +++++++++++++++---- 2 files changed, 44 insertions(+), 10 deletions(-) diff --git a/source/blender/render/hydra/render_task_delegate.cc b/source/blender/render/hydra/render_task_delegate.cc index 8062ef60697..ca65d0394f4 100644 --- a/source/blender/render/hydra/render_task_delegate.cc +++ b/source/blender/render/hydra/render_task_delegate.cc @@ -30,6 +30,10 @@ RenderTaskDelegate::RenderTaskDelegate(pxr::HdRenderIndex *parent_index, task_params_.enableLighting = true; task_params_.alphaThreshold = 0.1f; + /* Disable this so Metal and OpenGL match in Storm render tests, only + * the former seems to use multisample. */ + task_params_.useAovMultiSample = false; + CLOG_INFO(LOG_HYDRA_RENDER, 1, "%s", task_id_.GetText()); } diff --git a/tests/python/storm_render_tests.py b/tests/python/storm_render_tests.py index 3700986f9da..3a7add6c7aa 100644 --- a/tests/python/storm_render_tests.py +++ b/tests/python/storm_render_tests.py @@ -10,23 +10,51 @@ from pathlib import Path # Unsupported or broken scenarios for the Storm render engine BLOCKLIST_HYDRA = [ - # Corrupted output - "image_half.*.blend", - "image_packed_float.*.blend", - "image_packed_half.*.blend", + # Corrupted output around borders + "image.*_half.*.blend", + "image.*_float.*.blend", # Differences between devices/drivers causing this to fail "image.blend", ] BLOCKLIST_USD = [ - # Corrupted output - "image_half.*.blend", - "image_packed_float.*.blend", - "image_packed_half.*.blend", + # Corrupted output around borders + "image.*_half.*.blend", + "image.*_float.*.blend", # Nondeterministic exporting of lights in the scene "light_tree_node_subtended_angle.blend", ] +# Metal support in Storm is no as good as OpenGL, though this needs to be +# retested with newer OpenUSD versions as there are improvements. +BLOCKLIST_METAL = [ + # Thinfilm + "metallic.*physical.blend", + "metallic.*f82.blend", + "principled.*thinfilm.*.blend", + # Transparency + "ray_portal.blend", + "transparent.blend", + "transparent_shadow.blend", + "shadow_all_max_bounces.blend", + "underwater_caustics.blend", + "shadow_link_transparency.blend", + "principled_bsdf_transmission.blend", + # Volume + "light_link_surface_in_volume.blend", + "openvdb.*.blend", + "principled_bsdf_interior", + # Other + "bump.*.blend", + "bevel.*.blend", + "principled_bsdf_coat.blend", + "principled_bsdf_emission.blend", + "white_noise.*.blend", + "musgrave_multifractal.*.blend", + "autosmooth_custom_normals.blend", + "diffuse_normal_map.blend", +] + def setup(): import bpy @@ -89,12 +117,14 @@ def main(): from modules import render_report + blocklist = BLOCKLIST_METAL if sys.platform == "darwin" else [] + if args.export_method == 'HYDRA': - report = render_report.Report("Storm Hydra", args.outdir, args.oiiotool, blocklist=BLOCKLIST_HYDRA) + report = render_report.Report("Storm Hydra", args.outdir, args.oiiotool, blocklist=blocklist + BLOCKLIST_HYDRA) report.set_reference_dir("storm_hydra_renders") report.set_compare_engine('cycles', 'CPU') else: - report = render_report.Report("Storm USD", args.outdir, args.oiiotool, blocklist=BLOCKLIST_USD) + report = render_report.Report("Storm USD", args.outdir, args.oiiotool, blocklist=blocklist + BLOCKLIST_USD) report.set_reference_dir("storm_usd_renders") report.set_compare_engine('storm_hydra')