Merge branch 'blender-v5.0-release'

This commit is contained in:
Brecht Van Lommel
2025-10-16 18:03:58 +02:00
6 changed files with 101 additions and 83 deletions

View File

@@ -170,26 +170,6 @@ if inside_blender:
sys.exit(1)
def get_gpu_device_type(blender):
# TODO: This always fails.
command = [
blender,
"--background",
"--factory-startup",
"--python",
str(pathlib.Path(__file__).parent / "gpu_info.py")
]
try:
completed_process = subprocess.run(command, stdout=subprocess.PIPE)
for line in completed_process.stdout.read_text():
if line.startswith("GPU_DEVICE_TYPE:"):
vendor = line.split(':')[1]
return vendor
except Exception:
return None
return None
def get_arguments(filepath, output_filepath, gpu_backend):
arguments = [
"--background",
@@ -230,11 +210,6 @@ def main():
parser = create_argparse()
args = parser.parse_args()
gpu_device_type = get_gpu_device_type(args.blender)
reference_override_dir = None
if gpu_device_type == "AMD":
reference_override_dir = "eevee_renders/amd"
blocklist = BLOCKLIST
if args.gpu_backend == "metal":
blocklist += BLOCKLIST_METAL
@@ -249,7 +224,6 @@ def main():
report.set_pixelated(True)
report.set_reference_dir("eevee_renders")
report.set_reference_override_dir(reference_override_dir)
test_dir_name = Path(args.testdir).name
if test_dir_name.startswith('image_mapping'):

View File

@@ -174,6 +174,25 @@ def diff_output(test, oiiotool, fail_threshold, fail_percent, verbose, update):
return test
def get_gpu_device_vendor(blender):
command = [
blender,
"--background",
"--factory-startup",
"--python",
str(pathlib.Path(__file__).parent / "gpu_info.py")
]
try:
completed_process = subprocess.run(command, stdout=subprocess.PIPE, universal_newlines=True)
for line in completed_process.stdout.splitlines():
if line.startswith("GPU_DEVICE_TYPE:"):
vendor = line.split(':')[1].upper()
return vendor
except Exception:
return None
return None
class Report:
__slots__ = (
'title',

View File

@@ -59,6 +59,25 @@ BLOCKLIST_METAL = [
"autosmooth_custom_normals.blend",
]
# AMD seems to have similar limitations as Metal for transparency.
BLOCKLIST_AMD = BLOCKLIST_METAL + [
"musgrave_.*_multifractal.*.blend",
"noise_lacunarity.blend",
]
# Minor difference in texture coordinate for white noise hash.
BLOCKLIST_INTEL = [
"autosmooth_custom_normals.blend",
"hair_reflection.blend",
"hair_transmission.blend",
"principled_bsdf_emission.blend",
"principled_bsdf_sheen.blend",
"musgrave_.*_multifractal.*.blend",
"noise_lacunarity.blend",
"sss_hair.blend",
"white_noise.*.blend",
]
def setup():
import bpy
@@ -120,7 +139,16 @@ def main():
from modules import render_report
blocklist = BLOCKLIST_METAL if sys.platform == "darwin" else []
if sys.platform == "darwin":
blocklist = BLOCKLIST_METAL
else:
gpu_vendor = render_report.get_gpu_device_vendor(args.blender)
if gpu_vendor == "AMD":
blocklist = BLOCKLIST_AMD
elif gpu_vendor == "INTEL":
blocklist = BLOCKLIST_INTEL
else:
blocklist = []
if args.export_method == 'HYDRA':
report = render_report.Report("Storm Hydra", args.outdir, args.oiiotool, blocklist=blocklist + BLOCKLIST_HYDRA)