diff --git a/USAGE_desktop_D3D12.md b/USAGE_desktop_D3D12.md
index b3f69afeb7..0e73e32831 100644
--- a/USAGE_desktop_D3D12.md
+++ b/USAGE_desktop_D3D12.md
@@ -183,7 +183,7 @@ Usage:
[--screenshot-dir
] [--screenshot-prefix ]
[--sfa | --skip-failed-allocations] [--replace-shaders ]
[--opcd | --omit-pipeline-cache-data] [--wsi ]
- [--dcp | --discard-cached-psos] [--surface-index ]
+ [--use-cached-psos] [--surface-index ]
[--remove-unsupported] [--validate]
[--onhb | --omit-null-hardware-buffers]
[-m | --memory-translation ]
@@ -285,16 +285,15 @@ 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 Setup windowed and override resolution.
- (Same as --force-windowed)
- --create-dummy-allocations Enables creation of dummy heaps and resources
- for replay validation.
+ --use-cached-psos Permit using cached PSOs when creating graphics or compute pipelines.
+ Using cached PSOs may reduce PSO creation time but may result in replay errors.
+ --debug-device-lost Enables automatic injection of breadcrumbs into command buffers
+ and page fault reporting.
+ Used to debug Direct3D 12 device removed problems.
+ --fw 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.
diff --git a/framework/decode/dx12_replay_consumer_base.cpp b/framework/decode/dx12_replay_consumer_base.cpp
index b514d29142..0e81ad91ed 100644
--- a/framework/decode/dx12_replay_consumer_base.cpp
+++ b/framework/decode/dx12_replay_consumer_base.cpp
@@ -2207,7 +2207,7 @@ HRESULT Dx12ReplayConsumerBase::OverrideLoadGraphicsPipeline(
(desc != nullptr) && (desc->GetPointer() != nullptr) && (state != nullptr));
auto desc2 = desc->GetPointer();
- if (options_.discard_cached_psos)
+ if (!options_.use_cached_psos)
{
desc2->CachedPSO.pCachedBlob = nullptr;
desc2->CachedPSO.CachedBlobSizeInBytes = 0;
@@ -2240,7 +2240,7 @@ HRESULT Dx12ReplayConsumerBase::OverrideLoadComputePipeline(
(desc != nullptr) && (desc->GetPointer() != nullptr) && (state != nullptr));
auto desc2 = desc->GetPointer();
- if (options_.discard_cached_psos)
+ if (!options_.use_cached_psos)
{
desc2->CachedPSO.pCachedBlob = nullptr;
desc2->CachedPSO.CachedBlobSizeInBytes = 0;
@@ -3107,7 +3107,7 @@ HRESULT Dx12ReplayConsumerBase::OverrideCreateGraphicsPipelineState(
auto device = static_cast(device_object_info->object);
auto pDesc2 = pDesc->GetPointer();
- if (options_.discard_cached_psos)
+ if (!options_.use_cached_psos)
{
pDesc2->CachedPSO.pCachedBlob = nullptr;
pDesc2->CachedPSO.CachedBlobSizeInBytes = 0;
@@ -3134,7 +3134,7 @@ HRESULT Dx12ReplayConsumerBase::OverrideCreateComputePipelineState(
auto device = static_cast(device_object_info->object);
auto pDesc2 = pDesc->GetPointer();
- if (options_.discard_cached_psos)
+ if (!options_.use_cached_psos)
{
pDesc2->CachedPSO.pCachedBlob = nullptr;
pDesc2->CachedPSO.CachedBlobSizeInBytes = 0;
diff --git a/framework/decode/dx_replay_options.h b/framework/decode/dx_replay_options.h
index cd89e2a297..d3fc306081 100644
--- a/framework/decode/dx_replay_options.h
+++ b/framework/decode/dx_replay_options.h
@@ -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 use_cached_psos{ false };
std::vector AllowedDebugMessages;
std::vector DeniedDebugMessages;
bool override_object_names{ false };
diff --git a/tools/optimize/dx12_optimize_util.cpp b/tools/optimize/dx12_optimize_util.cpp
index b258532a45..531451153e 100644
--- a/tools/optimize/dx12_optimize_util.cpp
+++ b/tools/optimize/dx12_optimize_util.cpp
@@ -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(
diff --git a/tools/replay/replay_settings.h b/tools/replay/replay_settings.h
index ea30d591b1..1560e0a6cf 100644
--- a/tools/replay/replay_settings.h
+++ b/tools/replay/replay_settings.h
@@ -31,7 +31,7 @@ const char kOptions[] =
"opcd|--omit-pipeline-cache-data,--remove-unsupported,--validate,--debug-device-lost,--create-dummy-allocations,--"
"screenshot-all,--onhb|--omit-null-hardware-buffers,--qamr|--quit-after-measurement-"
"range,--fmr|--flush-measurement-range,--use-captured-swapchain-indices,--dcp,--discard-cached-psos,"
- "--dx12-override-object-names";
+ "--use-cached-psos,--dx12-override-object-names";
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,--"
@@ -55,7 +55,7 @@ static void PrintUsage(const char* exe_name)
GFXRECON_WRITE_CONSOLE("\t\t\t[--screenshot-dir ] [--screenshot-prefix ]");
GFXRECON_WRITE_CONSOLE("\t\t\t[--sfa | --skip-failed-allocations] [--replace-shaders ]");
GFXRECON_WRITE_CONSOLE("\t\t\t[--opcd | --omit-pipeline-cache-data] [--wsi ]");
- GFXRECON_WRITE_CONSOLE("\t\t\t[--surface-index ]");
+ GFXRECON_WRITE_CONSOLE("\t\t\t[--use-cached-psos] [--surface-index ]");
GFXRECON_WRITE_CONSOLE("\t\t\t[--remove-unsupported] [--validate]");
GFXRECON_WRITE_CONSOLE("\t\t\t[--onhb | --omit-null-hardware-buffers]");
GFXRECON_WRITE_CONSOLE("\t\t\t[-m | --memory-translation ]");
@@ -200,9 +200,10 @@ static void PrintUsage(const char* exe_name)
#if defined(WIN32)
GFXRECON_WRITE_CONSOLE("")
GFXRECON_WRITE_CONSOLE("D3D12-only:")
- GFXRECON_WRITE_CONSOLE(" --dcp\t\t\tForce CachedPSO to null when creating graphics or compute PSOs.");
- GFXRECON_WRITE_CONSOLE(" \t\t\tCan help enable replay across changing driver installs.");
- GFXRECON_WRITE_CONSOLE(" \t\t\t(Same as --discard-cached-psos)");
+ GFXRECON_WRITE_CONSOLE(
+ " --use-cached-psos \tPermit using cached PSOs when creating graphics or compute pipelines.");
+ GFXRECON_WRITE_CONSOLE(
+ " \t\t\tUsing cached PSOs may reduce PSO creation time but may result in replay errors.");
GFXRECON_WRITE_CONSOLE(" --debug-device-lost\tEnables automatic injection of breadcrumbs into command buffers");
GFXRECON_WRITE_CONSOLE(" \t\tand page fault reporting.");
GFXRECON_WRITE_CONSOLE(" \t\tUsed to debug Direct3D 12 device removed problems.");
diff --git a/tools/tool_settings.h b/tools/tool_settings.h
index 55daabc820..b591b386e9 100644
--- a/tools/tool_settings.h
+++ b/tools/tool_settings.h
@@ -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 kUseCachedPsosOption[] = "--use-cached-psos";
const char kOmitPipelineCacheDataShortOption[] = "--opcd";
const char kOmitPipelineCacheDataLongOption[] = "--omit-pipeline-cache-data";
const char kWsiArgument[] = "--wsi";
@@ -805,7 +806,13 @@ 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 deprecated in favor for "
+ "--use-cached-psos");
+ }
+
+ if (arg_parser.IsOptionSet(kUseCachedPsosOption))
+ {
+ replay_options.use_cached_psos = true;
}
if (arg_parser.IsOptionSet(kDxOverrideObjectNames))