Tests: Move GPU vendor query function to module, remove dead code for EEVEE

The implementation of this was broken and not actually used for the EEVEE
tests, as there is currently no separate reference directory for AMD.

Move it to the render report module so it can be reused by different tests.

Pull Request: https://projects.blender.org/blender/blender/pulls/148148
This commit is contained in:
Brecht Van Lommel
2025-10-15 16:16:30 +02:00
parent 74b7d663e1
commit dbfab80943
4 changed files with 20 additions and 26 deletions

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',