mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-28 01:16:31 +00:00
Account for D3D12 applications that call CheckFeatureSupport often
* The log is spammy if they check once per frame for example.
This commit is contained in:
@@ -3329,12 +3329,18 @@ HRESULT WrappedID3D12Device::SetStablePowerState(BOOL Enable)
|
||||
HRESULT WrappedID3D12Device::CheckFeatureSupport(D3D12_FEATURE Feature, void *pFeatureSupportData,
|
||||
UINT FeatureSupportDataSize)
|
||||
{
|
||||
RDCLOG("Checking feature support for %d", Feature);
|
||||
static bool logged = false;
|
||||
bool dolog = !logged;
|
||||
logged = true;
|
||||
|
||||
if(dolog)
|
||||
RDCLOG("Checking feature support for %d", Feature);
|
||||
HRESULT hr = m_pDevice->CheckFeatureSupport(Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||
|
||||
if(FAILED(hr))
|
||||
{
|
||||
RDCLOG("CheckFeatureSupport returned %s", ToStr(hr).c_str());
|
||||
if(dolog)
|
||||
RDCLOG("CheckFeatureSupport returned %s", ToStr(hr).c_str());
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -3344,7 +3350,8 @@ HRESULT WrappedID3D12Device::CheckFeatureSupport(D3D12_FEATURE Feature, void *pF
|
||||
if(FeatureSupportDataSize != sizeof(D3D12_FEATURE_DATA_SHADER_MODEL))
|
||||
return E_INVALIDARG;
|
||||
|
||||
RDCLOG("Clamping shader model from 0x%x to 6.6", model->HighestShaderModel);
|
||||
if(dolog)
|
||||
RDCLOG("Clamping shader model from 0x%x to 6.6", model->HighestShaderModel);
|
||||
|
||||
// clamp SM to what we support
|
||||
model->HighestShaderModel = RDCMIN(model->HighestShaderModel, D3D_SHADER_MODEL_6_6);
|
||||
@@ -3360,7 +3367,8 @@ HRESULT WrappedID3D12Device::CheckFeatureSupport(D3D12_FEATURE Feature, void *pF
|
||||
// can't capture or replay this properly.
|
||||
opts->Support = D3D12_PROTECTED_RESOURCE_SESSION_SUPPORT_FLAG_NONE;
|
||||
|
||||
RDCLOG("Forcing no protected session tier support");
|
||||
if(dolog)
|
||||
RDCLOG("Forcing no protected session tier support");
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -3374,7 +3382,8 @@ HRESULT WrappedID3D12Device::CheckFeatureSupport(D3D12_FEATURE Feature, void *pF
|
||||
// don't support raytracing
|
||||
opts->RaytracingTier = D3D12_RAYTRACING_TIER_NOT_SUPPORTED;
|
||||
|
||||
RDCLOG("Forcing no raytracing tier support");
|
||||
if(dolog)
|
||||
RDCLOG("Forcing no raytracing tier support");
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -3389,7 +3398,8 @@ HRESULT WrappedID3D12Device::CheckFeatureSupport(D3D12_FEATURE Feature, void *pF
|
||||
opts->MeshShaderTier = D3D12_MESH_SHADER_TIER_NOT_SUPPORTED;
|
||||
opts->SamplerFeedbackTier = D3D12_SAMPLER_FEEDBACK_TIER_NOT_SUPPORTED;
|
||||
|
||||
RDCLOG("Forcing no mesh shading or sampler feedback tier support");
|
||||
if(dolog)
|
||||
RDCLOG("Forcing no mesh shading or sampler feedback tier support");
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user