diff options
author | José Fonseca <jfonseca@vmware.com> | 2015-03-26 15:22:17 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2015-03-26 15:23:04 +0000 |
commit | 56e6eca5b1675a33cd65626d0c88fa5a5da9052a (patch) | |
tree | 8cf5e95bc2277025aa5e48e14474ed221af844bd /scripts | |
parent | 7b5e68d0fe2eff97b6bd3ea1508cbfa0bfff08bf (diff) |
convert: Handle single-frame pixruns.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/convert.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/scripts/convert.py b/scripts/convert.py index 0da7bf5d..5f338d80 100755 --- a/scripts/convert.py +++ b/scripts/convert.py @@ -147,8 +147,15 @@ def convertFromPix(inPix, outTrace): '-o', outTrace, pixExe, inPix, - '-playstandalone', ] + + # XXX: Autodetect somehow + if not options.single_frame: + # Full capture + cmd += ['-playstandalone'] + else: + # Single-frame capture + cmd += ['-autorenderto', 'nul:'] callProcess(cmd) verifyTrace(outTrace) @@ -235,6 +242,10 @@ def main(): type="string", dest="output", help="output file [default: stdout]") optparser.add_option( + '--single-frame', + action='store_true', dest='single_frame', default=False, + help='single-frame PIXRun capture') + optparser.add_option( '--verify', action='store_true', dest='verify', default=False, help='verify output by replaying it') @@ -264,6 +275,9 @@ def main(): outFile = options.output else: outFile = name + outExt + + if os.path.exists(outFile): + os.remove(outFile) convert(inFile, outFile) |