Skip to content

Commit

Permalink
enable-dcp argument
Browse files Browse the repository at this point in the history
  • Loading branch information
igorbrsn committed Jul 20, 2023
1 parent 7ad0ef7 commit 03a98d4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
22 changes: 11 additions & 11 deletions USAGE_desktop_D3D12.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Usage:
[--screenshot-dir <dir>] [--screenshot-prefix <file-prefix>]
[--sfa | --skip-failed-allocations] [--replace-shaders <dir>]
[--opcd | --omit-pipeline-cache-data] [--wsi <platform>]
[--dcp | --discard-cached-psos] [--surface-index <N>]
[--enable-dcp <boolean>] [--surface-index <N>]
[--remove-unsupported] [--validate]
[--onhb | --omit-null-hardware-buffers]
[-m <mode> | --memory-translation <mode>]
Expand Down Expand Up @@ -285,16 +285,16 @@ Vulkan-only:
and suballocations.
D3D12-only:
--dcp Force CachedPSO to null when creating graphics or compute PSOs.
Can help enable replay across changing driver installs.
(Same as --discard-cached-psos)
--debug-device-lost Enables automatic injection of breadcrumbs into command buffers
and page fault reporting.
Used to debug Direct3D 12 device removed problems.
--fw <width,height> Setup windowed and override resolution.
(Same as --force-windowed)
--create-dummy-allocations Enables creation of dummy heaps and resources
for replay validation.
--enable-dcp <boolean> Force CachedPSO to null when creating graphics or compute PSOs.
Can help enable replay across changing driver installs.
Default: enabled
--debug-device-lost Enables automatic injection of breadcrumbs into command buffers
and page fault reporting.
Used to debug Direct3D 12 device removed problems.
--fw <width,height> Setup windowed and override resolution.
(Same as --force-windowed)
--create-dummy-allocations Enables creation of dummy heaps and resources
for replay validation.
--dx12-override-object-names Generates unique names for all ID3D12Objects and
assigns each object the generated name.
This is intended to assist replay debugging.
Expand Down
2 changes: 1 addition & 1 deletion framework/decode/dx_replay_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct DxReplayOptions : public ReplayOptions
{
bool enable_d3d12{ true };
bool enable_d3d12_two_pass_replay{ false };
bool discard_cached_psos{ false };
bool discard_cached_psos{ true };
std::vector<int32_t> AllowedDebugMessages;
std::vector<int32_t> DeniedDebugMessages;
bool override_object_names{ false };
Expand Down
1 change: 0 additions & 1 deletion tools/optimize/dx12_optimize_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ void CreateResourceValueTrackingConsumer(

// Use default replay options, except dcp.
decode::DxReplayOptions dx_replay_options;
dx_replay_options.discard_cached_psos = true;

// Create the replay consumer.
dx12_replay_consumer = std::make_unique<decode::Dx12ResourceValueTrackingConsumer>(
Expand Down
3 changes: 2 additions & 1 deletion tools/replay/replay_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ const char kOptions[] =
const char kArguments[] =
"--log-level,--log-file,--gpu,--gpu-group,--pause-frame,--wsi,--surface-index,-m|--memory-translation,"
"--replace-shaders,--screenshots,--denied-messages,--allowed-messages,--screenshot-format,--"
"screenshot-dir,--screenshot-prefix,--mfr|--measurement-frame-range,--fw|--force-windowed";
"screenshot-dir,--screenshot-prefix,--mfr|--measurement-frame-range,--fw|--force-windowed,"
"--enable-dcp";

static void PrintUsage(const char* exe_name)
{
Expand Down
10 changes: 9 additions & 1 deletion tools/tool_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const char kSkipFailedAllocationShortOption[] = "--sfa";
const char kSkipFailedAllocationLongOption[] = "--skip-failed-allocations";
const char kDiscardCachedPsosShortOption[] = "--dcp";
const char kDiscardCachedPsosLongOption[] = "--discard-cached-psos";
const char kDiscardCachedPsosArgument[] = "--enable-dcp";
const char kOmitPipelineCacheDataShortOption[] = "--opcd";
const char kOmitPipelineCacheDataLongOption[] = "--omit-pipeline-cache-data";
const char kWsiArgument[] = "--wsi";
Expand Down Expand Up @@ -805,7 +806,14 @@ static gfxrecon::decode::DxReplayOptions GetDxReplayOptions(const gfxrecon::util

if (arg_parser.IsOptionSet(kDiscardCachedPsosLongOption) || arg_parser.IsOptionSet(kDiscardCachedPsosShortOption))
{
replay_options.discard_cached_psos = true;
GFXRECON_LOG_WARNING("The parameters --dcp and --discard-cached-psos have been depracated in favor for "
"--enable-dcp <boolean> (default true)");
}

const auto& psos_value = arg_parser.GetArgumentValue(kDiscardCachedPsosArgument);
if (!psos_value.empty())
{
replay_options.discard_cached_psos = gfxrecon::util::ParseBoolString(psos_value, true);
}

if (arg_parser.IsOptionSet(kDxOverrideObjectNames))
Expand Down

0 comments on commit 03a98d4

Please sign in to comment.