summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRhys Perry <pendingchaos02@gmail.com>2020-03-18 21:40:40 +0000
committerRhys Perry <pendingchaos02@gmail.com>2020-04-30 16:49:28 +0100
commit5c852a77f18248607f11331d06b83069342c75ca (patch)
tree749555fe8107b3096932d0068ce87c023e1ee48c
parent7fb3e447da1cb7e92e4294aed937606f5ee46639 (diff)
fossils: add fossil_prune_replay.sh
Useful for replaying a specific pipeline by hash. Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net>
-rw-r--r--README.md4
-rwxr-xr-xfossil_prune_replay.sh24
2 files changed, 28 insertions, 0 deletions
diff --git a/README.md b/README.md
index 065a315..6fcc75f 100644
--- a/README.md
+++ b/README.md
@@ -109,6 +109,10 @@ You will need a vulkan driver with pipeline statistics:
$ fossilize-replay --enable-pipeline-stats output.csv --num-threads 4 fossils/**/*.foz
+Or you can use fossil_prune_replay.sh to replay a specific pipeline by hash:
+
+ $ ./fossil_prune_replay.sh fossils/ 012897d03e30f26f
+
If you do not get a .csv file it likely means that a driver without
`VK_KHR_pipeline_statistics`, such as a system installed driver.
diff --git a/fossil_prune_replay.sh b/fossil_prune_replay.sh
new file mode 100755
index 0000000..ab4f54b
--- /dev/null
+++ b/fossil_prune_replay.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+# Copyright © 2020 Valve Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+# Usage: fossil_prune_replay.sh fossils/ pipeline_hash <arguments to pass to fossilize-replay>
+# Set the "SHADERDB_DBG" environment variable to "gdb --args" or "valgrind" to run under gdb or valgrind
+find -L "$1" -type f -name "*.foz" -exec $SHADERDB_DBG fossilize-replay --pipeline-hash "$2" ${@:3} {} +