From dc9834dcf5ccd382e126f018b12b35248daf9386 Mon Sep 17 00:00:00 2001 From: Mark Young Date: Fri, 9 Feb 2024 13:32:12 -0700 Subject: [PATCH] vulkan: Update Usage and replay script Update the usage and replay scripts to support the new --flush-inside-measurement-range option. --- USAGE_android.md | 4 ++++ USAGE_desktop_Vulkan.md | 4 ++++ android/scripts/gfxrecon.py | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/USAGE_android.md b/USAGE_android.md index 2d119c0241..b2e6563bcd 100644 --- a/USAGE_android.md +++ b/USAGE_android.md @@ -859,6 +859,10 @@ optional arguments: If this is specified the replayer will flush and wait for all current GPU work to finish at the start and end of the measurement range. (forwarded to replay tool) + --flush-inside-measurement-range + If this is specified the replayer will flush and wait + for all current GPU work to finish at the end of each + frame inside the measurement range. (forwarded to replay tool) --use-colorspace-fallback Swap the swapchain color space if unsupported by replay device. Check if color space is not supported by replay device and swap diff --git a/USAGE_desktop_Vulkan.md b/USAGE_desktop_Vulkan.md index b53b32df1e..e8ebd0766f 100644 --- a/USAGE_desktop_Vulkan.md +++ b/USAGE_desktop_Vulkan.md @@ -532,6 +532,10 @@ Optional arguments: If this is specified the replayer will flush and wait for all current GPU work to finish at the start and end of the measurement range. + --flush-inside-measurement-range + If this is specified the replayer will flush and wait + for all current GPU work to finish at the end of each + frame inside the measurement range. --use-colorspace-fallback Swap the swapchain color space if unsupported by replay device. Check if color space is not supported by replay device and diff --git a/android/scripts/gfxrecon.py b/android/scripts/gfxrecon.py index d7696ebbfa..b5261e1ea3 100644 --- a/android/scripts/gfxrecon.py +++ b/android/scripts/gfxrecon.py @@ -89,6 +89,7 @@ def CreateReplayParser(): parser.add_argument('--measurement-file', metavar='DEVICE_FILE', help='Write measurements to a file at the specified path. Default is: \'/sdcard/gfxrecon-measurements.json\' on android and \'./gfxrecon-measurements.json\' on desktop. (forwarded to replay tool)') parser.add_argument('--quit-after-measurement-range', action='store_true', default=False, help='If this is specified the replayer will abort when it reaches the specified in the --measurement-frame-range argument. (forwarded to replay tool)') parser.add_argument('--flush-measurement-range', action='store_true', default=False, help='If this is specified the replayer will flush and wait for all current GPU work to finish at the start and end of the measurement range. (forwarded to replay tool)') + parser.add_argument('--flush-inside-measurement-range', action='store_true', default=False, help='If this is specified the replayer will flush and wait for all current GPU work to finish at end of each frame inside the measurement range. (forwarded to replay tool)') parser.add_argument('-m', '--memory-translation', metavar='MODE', choices=['none', 'remap', 'realign', 'rebind'], help='Enable memory translation for replay on GPUs with memory types that are not compatible with the capture GPU\'s memory types. Available modes are: none, remap, realign, rebind (forwarded to replay tool)') parser.add_argument('--swapchain', metavar='MODE', choices=['virtual', 'captured', 'offscreen'], help='Choose a swapchain mode to replay. Available modes are: virtual, captured, offscreen (forwarded to replay tool)') parser.add_argument('--use-captured-swapchain-indices', action='store_true', default=False, help='Same as "--swapchain captured". Ignored if the "--swapchain" option is used.') @@ -186,6 +187,10 @@ def MakeExtrasString(args): arg_list.append('--flush-measurement-range') arg_list.append('{}'.format(args.flush_measurement_range)) + if args.flush_inside_measurement_range: + arg_list.append('--flush-inside-measurement-range') + arg_list.append('{}'.format(args.flush_inside_measurement_range)) + if args.swapchain: arg_list.append('--swapchain') arg_list.append('{}'.format(args.swapchain))