Commit d052aa8b authored by Elie Tournier's avatar Elie Tournier

script: mv reference to use GPU driver name

Signed-off-by: default avatarElie Tournier <elie.tournier@collabora.com>
parent bd564be7
Pipeline #51660 failed with stages
in 5 minutes and 49 seconds
......@@ -119,6 +119,7 @@ conformance:
- export DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)"
- export LD_LIBRARY_PATH="/usr/local/lib/:$CI_PROJECT_DIR/install/lib/$DEB_HOST_MULTIARCH"
- bash $CI_PROJECT_DIR/scripts/setup-x.sh
- export DEVICE_NAME="$(glxinfo | python3 scripts/vendor_device_name.py)"
- export PYTHONPATH=/usr/local/lib/$(py3versions -d)/site-packages # Required for renderdoc
script:
- cd $CI_PROJECT_DIR/repos/traces-db
......
Subproject commit 1283137e557c9db09c55c9e91aee0ea9926e9b1a
Subproject commit 6cdcfceba2a3c25f70949813492885de4e3e4f18
......@@ -12,7 +12,7 @@ def log(severity, msg):
def get_calls_num(trace):
tracename = str(Path(trace).name)
refdir = str(Path(trace).parent / "references")
refdir = str(Path(trace).parent / "references" / os.environ['DEVICE_NAME'])
calls = []
for root, dirs, files in os.walk(refdir):
for file in files:
......@@ -22,7 +22,7 @@ def get_calls_num(trace):
return calls
def dump_with_apitrace(trace, calls):
outputprefix = str(Path(trace).parent / "test" / Path(trace).name) + "-"
outputprefix = str(Path(trace).parent / "test" / os.environ['DEVICE_NAME'] / Path(trace).name) + "-"
cmd = ["apitrace", "dump-images", "--calls=" + ','.join(calls),
"-o", outputprefix, trace]
ret = subprocess.call(cmd)
......@@ -30,7 +30,7 @@ def dump_with_apitrace(trace, calls):
raise RuntimeError("Apitrace dump-images failed!")
def dump_with_renderdoc(trace, calls):
outputdir = str(Path(trace).parent / "test")
outputdir = str(Path(trace).parent / "test" / os.environ['DEVICE_NAME'])
renderdoc_dump_images(trace, [int(c) for c in calls], outputdir);
def dump_from_trace(trace):
......
......@@ -25,7 +25,7 @@ def dumpImage(controller, eventId, outputDir, tracefile):
if texsave.resourceId == rd.ResourceId.Null():
return
filepath = Path(outputDir)
filepath = Path(outputDir)
filepath.mkdir(parents = True, exist_ok = True)
filepath = filepath / (tracefile + "-" + str(int(draw.eventId)) + ".png")
......
#!/usr/bin/env python3
import sys
import re
def is_vendor_string(s):
return "Vendor:" in s
def is_device_string(s):
return "Device:" in s
def id_from_string(s):
match = re.search("\((0x[0-9A-Fa-f]+)\)$", s)
if match:
return match[1]
return None
def vendor_from_string(s):
if "Intel" in s:
return "intel"
elif "VMware" in s:
return "vmware"
else:
return id_from_string(s)
def device_from_string(s):
if "softpipe" in s:
return "softpipe"
elif "llvmpipe" in s:
return "llvmpipe"
else:
return id_from_string(s)
vendor = None
device = None
for l in sys.stdin:
if is_vendor_string(l):
vendor = vendor_from_string(l)
elif is_device_string(l):
device = device_from_string(l)
if vendor is not None and device is not None:
break
if vendor is None or device is None:
sys.exit(1)
print("%s-%s" % (vendor, device))
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