Commit d600532e authored by Alexandros Frantzis's avatar Alexandros Frantzis

scripts: Run renderdoc in a separate process per trace

This avoids potential context related conflicts within renderdoc between
runs of different traces.
Signed-off-by: Alexandros Frantzis's avatarAlexandros Frantzis <>
parent 4b9a8e8e
Pipeline #80376 passed with stages
in 15 minutes and 12 seconds
......@@ -27,7 +27,6 @@ import os
import sys
import subprocess
from pathlib import Path
from renderdoc_dump_images import renderdoc_dump_images
from traceutil import iter_trace_paths, trace_has_images, all_trace_type_names
from traceutil import trace_type_from_name, trace_type_from_filename, TraceType
......@@ -57,7 +56,12 @@ def dump_with_apitrace(trace, calls, device_name):
def dump_with_renderdoc(trace, calls, device_name):
outputdir = str(Path(trace).parent / "test" / device_name)
renderdoc_dump_images(trace, [int(c) for c in calls], outputdir);
script_path = Path(os.path.dirname(os.path.abspath(__file__)))
cmd = [str(script_path / ""), trace, outputdir]
ret =
if ret:
raise RuntimeError("Renderdoc dump-images failed!")
def dump_from_trace(trace, device_name):
log("Info", "Dumping trace %s" % trace)
#!/usr/bin/env python3
# Copyright (c) 2019 Collabora Ltd
# Permission is hereby granted, free of charge, to any person obtaining a
......@@ -93,9 +95,9 @@ def renderdoc_dump_images(filename, eventIds, outputDir):
if __name__ == "__main__":
if len(sys.argv) < 3:
raise RuntimeError("Usage: <trace> <draw-id>...")
if len(sys.argv) < 4:
raise RuntimeError("Usage: <trace> <outputdir> <draw-id>...")
eventIds = [int(e) for e in sys.argv[2:]]
eventIds = [int(e) for e in sys.argv[3:]]
renderdoc_dump_images(sys.argv[1], eventIds, '.')
renderdoc_dump_images(sys.argv[1], eventIds, sys.argv[2])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment