mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-23 06:56:40 +00:00
Reduce log spam when creating proxy drivers
This commit is contained in:
@@ -3789,14 +3789,17 @@ ReplayStatus D3D11_CreateReplayDevice(RDCFile *rdc, const ReplayOptions &opts, I
|
||||
ID3D11Device *device = NULL;
|
||||
HRESULT hr = E_FAIL;
|
||||
|
||||
const bool isProxy = (rdc == NULL);
|
||||
|
||||
// This says whether we're using warp at all
|
||||
bool useWarp = false;
|
||||
// This says if we've fallen back to warp after failing to find anything better (hence degraded
|
||||
// support because using warp was not deliberate)
|
||||
bool warpFallback = false;
|
||||
|
||||
ChooseBestMatchingAdapter(GraphicsAPI::D3D11, factory, initParams.AdapterDesc, opts, &useWarp,
|
||||
&adapter);
|
||||
if(!isProxy)
|
||||
ChooseBestMatchingAdapter(GraphicsAPI::D3D11, factory, initParams.AdapterDesc, opts, &useWarp,
|
||||
&adapter);
|
||||
|
||||
if(useWarp)
|
||||
SAFE_RELEASE(adapter);
|
||||
@@ -3909,7 +3912,7 @@ ReplayStatus D3D11_CreateReplayDevice(RDCFile *rdc, const ReplayOptions &opts, I
|
||||
D3D_FEATURE_LEVEL *featureLevelSubset = featureLevels + featureLevelPass;
|
||||
UINT numFeatureLevels = ARRAY_COUNT(featureLevels) - featureLevelPass;
|
||||
|
||||
RDCLOG(
|
||||
RDCDEBUG(
|
||||
"Creating D3D11 replay device, %ls adapter, driver type %s, flags %x, %d feature levels "
|
||||
"(first %s)",
|
||||
adapter ? chosenAdapter.Description : L"NULL", ToStr(driverType).c_str(), flags,
|
||||
@@ -3961,10 +3964,11 @@ ReplayStatus D3D11_CreateReplayDevice(RDCFile *rdc, const ReplayOptions &opts, I
|
||||
WrappedID3D11Device *wrappedDev = new WrappedID3D11Device(device, initParams);
|
||||
wrappedDev->SetInitParams(initParams, ver, opts);
|
||||
|
||||
RDCLOG("Created device.");
|
||||
if(!isProxy)
|
||||
RDCLOG("Created device.");
|
||||
D3D11Replay *replay = wrappedDev->GetReplay();
|
||||
|
||||
replay->SetProxy(rdc == NULL, warpFallback);
|
||||
replay->SetProxy(isProxy, warpFallback);
|
||||
replay->CreateResources(factory);
|
||||
if(warpFallback)
|
||||
{
|
||||
@@ -3983,7 +3987,7 @@ ReplayStatus D3D11_CreateReplayDevice(RDCFile *rdc, const ReplayOptions &opts, I
|
||||
|
||||
RDCERR("Couldn't create any compatible d3d11 device.");
|
||||
|
||||
if(flags & D3D11_CREATE_DEVICE_DEBUG)
|
||||
if((flags & D3D11_CREATE_DEVICE_DEBUG) && !isProxy)
|
||||
RDCLOG(
|
||||
"Development RenderDoc builds require D3D debug layers available, "
|
||||
"ensure you have the windows SDK or windows feature needed.");
|
||||
|
||||
@@ -3739,10 +3739,17 @@ ReplayStatus D3D12_CreateReplayDevice(RDCFile *rdc, const ReplayOptions &opts, I
|
||||
if(initParams.MinimumFeatureLevel < D3D_FEATURE_LEVEL_11_0)
|
||||
initParams.MinimumFeatureLevel = D3D_FEATURE_LEVEL_11_0;
|
||||
|
||||
AMDRGPControl *rgp = new AMDRGPControl();
|
||||
const bool isProxy = (rdc == NULL);
|
||||
|
||||
if(!rgp->Initialised())
|
||||
SAFE_DELETE(rgp);
|
||||
AMDRGPControl *rgp = NULL;
|
||||
|
||||
if(!isProxy)
|
||||
{
|
||||
rgp = new AMDRGPControl();
|
||||
|
||||
if(!rgp->Initialised())
|
||||
SAFE_DELETE(rgp);
|
||||
}
|
||||
|
||||
typedef HRESULT(WINAPI * PFN_CREATE_DXGI_FACTORY)(REFIID, void **);
|
||||
|
||||
@@ -3757,13 +3764,15 @@ ReplayStatus D3D12_CreateReplayDevice(RDCFile *rdc, const ReplayOptions &opts, I
|
||||
|
||||
IDXGIAdapter *adapter = NULL;
|
||||
|
||||
ChooseBestMatchingAdapter(GraphicsAPI::D3D12, factory, initParams.AdapterDesc, opts, NULL,
|
||||
&adapter);
|
||||
if(!isProxy)
|
||||
ChooseBestMatchingAdapter(GraphicsAPI::D3D12, factory, initParams.AdapterDesc, opts, NULL,
|
||||
&adapter);
|
||||
|
||||
bool debugLayerEnabled = false;
|
||||
|
||||
RDCLOG("Creating D3D12 replay device, minimum feature level %s",
|
||||
ToStr(initParams.MinimumFeatureLevel).c_str());
|
||||
if(!isProxy)
|
||||
RDCLOG("Creating D3D12 replay device, minimum feature level %s",
|
||||
ToStr(initParams.MinimumFeatureLevel).c_str());
|
||||
|
||||
bool shouldEnableDebugLayer = opts.apiValidation;
|
||||
|
||||
@@ -3776,7 +3785,7 @@ ReplayStatus D3D12_CreateReplayDevice(RDCFile *rdc, const ReplayOptions &opts, I
|
||||
{
|
||||
debugLayerEnabled = EnableD3D12DebugLayer();
|
||||
|
||||
if(!debugLayerEnabled)
|
||||
if(!debugLayerEnabled && !isProxy)
|
||||
{
|
||||
RDCLOG(
|
||||
"Enabling the D3D debug layers failed, "
|
||||
@@ -3811,11 +3820,12 @@ ReplayStatus D3D12_CreateReplayDevice(RDCFile *rdc, const ReplayOptions &opts, I
|
||||
WrappedID3D12Device *wrappedDev = new WrappedID3D12Device(dev, initParams, debugLayerEnabled);
|
||||
wrappedDev->SetInitParams(initParams, ver, opts);
|
||||
|
||||
RDCLOG("Created device.");
|
||||
if(!isProxy)
|
||||
RDCLOG("Created device.");
|
||||
D3D12Replay *replay = wrappedDev->GetReplay();
|
||||
|
||||
replay->Set12On7(d3d12on7);
|
||||
replay->SetProxy(rdc == NULL);
|
||||
replay->SetProxy(isProxy);
|
||||
replay->SetRGP(rgp);
|
||||
|
||||
replay->Initialise(factory);
|
||||
|
||||
@@ -4190,12 +4190,23 @@ ReplayStatus Vulkan_CreateReplayDevice(RDCFile *rdc, const ReplayOptions &opts,
|
||||
|
||||
InitReplayTables(module);
|
||||
|
||||
AMDRGPControl *rgp = new AMDRGPControl();
|
||||
const bool isProxy = (rdc == NULL);
|
||||
|
||||
if(!rgp->Initialised())
|
||||
SAFE_DELETE(rgp);
|
||||
AMDRGPControl *rgp = NULL;
|
||||
|
||||
if(!isProxy)
|
||||
{
|
||||
rgp = new AMDRGPControl();
|
||||
|
||||
if(!rgp->Initialised())
|
||||
SAFE_DELETE(rgp);
|
||||
}
|
||||
|
||||
WrappedVulkan *vk = new WrappedVulkan();
|
||||
|
||||
VulkanReplay *replay = vk->GetReplay();
|
||||
replay->SetProxy(isProxy);
|
||||
|
||||
ReplayStatus status = vk->Initialise(initParams, ver, opts);
|
||||
|
||||
if(status != ReplayStatus::Succeeded)
|
||||
@@ -4207,8 +4218,6 @@ ReplayStatus Vulkan_CreateReplayDevice(RDCFile *rdc, const ReplayOptions &opts,
|
||||
}
|
||||
|
||||
RDCLOG("Created device.");
|
||||
VulkanReplay *replay = vk->GetReplay();
|
||||
replay->SetProxy(rdc == NULL);
|
||||
replay->SetRGP(rgp);
|
||||
|
||||
*driver = (IReplayDriver *)replay;
|
||||
|
||||
@@ -249,6 +249,7 @@ ReplayStatus WrappedVulkan::Initialise(VkInitParams ¶ms, uint64_t sectionVer
|
||||
SAFE_DELETE_ARRAY(props);
|
||||
}
|
||||
|
||||
if(!m_Replay.IsRemoteProxy())
|
||||
{
|
||||
size_t i = 0;
|
||||
for(const std::string &ext : supportedExtensions)
|
||||
@@ -303,14 +304,16 @@ ReplayStatus WrappedVulkan::Initialise(VkInitParams ¶ms, uint64_t sectionVer
|
||||
std::find(params.Extensions.begin(), params.Extensions.end(),
|
||||
VK_EXT_DEBUG_UTILS_EXTENSION_NAME) == params.Extensions.end())
|
||||
{
|
||||
RDCLOG("Enabling VK_EXT_debug_utils");
|
||||
if(!m_Replay.IsRemoteProxy())
|
||||
RDCLOG("Enabling VK_EXT_debug_utils");
|
||||
params.Extensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
|
||||
}
|
||||
else if(supportedExtensions.find(VK_EXT_DEBUG_REPORT_EXTENSION_NAME) != supportedExtensions.end() &&
|
||||
std::find(params.Extensions.begin(), params.Extensions.end(),
|
||||
VK_EXT_DEBUG_REPORT_EXTENSION_NAME) == params.Extensions.end())
|
||||
{
|
||||
RDCLOG("Enabling VK_EXT_debug_report");
|
||||
if(!m_Replay.IsRemoteProxy())
|
||||
RDCLOG("Enabling VK_EXT_debug_report");
|
||||
params.Extensions.push_back(VK_EXT_DEBUG_REPORT_EXTENSION_NAME);
|
||||
}
|
||||
|
||||
@@ -352,7 +355,8 @@ ReplayStatus WrappedVulkan::Initialise(VkInitParams ¶ms, uint64_t sectionVer
|
||||
std::find(params.Extensions.begin(), params.Extensions.end(),
|
||||
VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME) == params.Extensions.end())
|
||||
{
|
||||
RDCLOG("Enabling VK_EXT_validation_features");
|
||||
if(!m_Replay.IsRemoteProxy())
|
||||
RDCLOG("Enabling VK_EXT_validation_features");
|
||||
params.Extensions.push_back(VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME);
|
||||
|
||||
instinfo.pNext = &featuresEXT;
|
||||
@@ -362,7 +366,8 @@ ReplayStatus WrappedVulkan::Initialise(VkInitParams ¶ms, uint64_t sectionVer
|
||||
std::find(params.Extensions.begin(), params.Extensions.end(),
|
||||
VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME) == params.Extensions.end())
|
||||
{
|
||||
RDCLOG("Enabling VK_EXT_validation_flags");
|
||||
if(!m_Replay.IsRemoteProxy())
|
||||
RDCLOG("Enabling VK_EXT_validation_flags");
|
||||
params.Extensions.push_back(VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME);
|
||||
|
||||
instinfo.pNext = &flagsEXT;
|
||||
|
||||
Reference in New Issue
Block a user