Ensure D3D init params are fully initialised including adapter desc

This commit is contained in:
baldurk
2019-09-04 10:41:37 +01:00
parent 01c1b5bc71
commit b0cc357933
4 changed files with 8 additions and 26 deletions
-9
View File
@@ -453,15 +453,6 @@ ResourceRange::ResourceRange(ID3D11Resource *res, UINT mip, UINT slice)
stencilReadOnly = false;
}
D3D11InitParams::D3D11InitParams()
{
DriverType = D3D_DRIVER_TYPE_UNKNOWN;
Flags = 0;
SDKVersion = D3D11_SDK_VERSION;
NumFeatureLevels = 0;
RDCEraseEl(FeatureLevels);
}
bool D3D11InitParams::IsSupportedVersion(uint64_t ver)
{
if(ver == CurrentVersion)
+6 -8
View File
@@ -54,15 +54,13 @@ enum TextureDisplayType
struct D3D11InitParams
{
D3D11InitParams();
D3D_DRIVER_TYPE DriverType = D3D_DRIVER_TYPE_UNKNOWN;
UINT Flags = 0;
UINT SDKVersion = D3D11_SDK_VERSION;
UINT NumFeatureLevels = 0;
D3D_FEATURE_LEVEL FeatureLevels[16] = {};
D3D_DRIVER_TYPE DriverType;
UINT Flags;
UINT SDKVersion;
UINT NumFeatureLevels;
D3D_FEATURE_LEVEL FeatureLevels[16];
DXGI_ADAPTER_DESC AdapterDesc;
DXGI_ADAPTER_DESC AdapterDesc = {};
// check if a frame capture section version is supported
static const uint64_t CurrentVersion = 0x11;
-5
View File
@@ -184,11 +184,6 @@ HRESULT EnumAdapterByLuid(IDXGIFactory1 *factory, LUID luid, IDXGIAdapter **pAda
return E_FAIL;
}
D3D12InitParams::D3D12InitParams()
{
MinimumFeatureLevel = D3D_FEATURE_LEVEL_11_0;
}
bool D3D12InitParams::IsSupportedVersion(uint64_t ver)
{
if(ver == CurrentVersion)
+2 -4
View File
@@ -41,11 +41,9 @@ struct IAmdExtD3DFactory;
struct D3D12InitParams
{
D3D12InitParams();
D3D_FEATURE_LEVEL MinimumFeatureLevel = D3D_FEATURE_LEVEL_11_0;
D3D_FEATURE_LEVEL MinimumFeatureLevel;
DXGI_ADAPTER_DESC AdapterDesc;
DXGI_ADAPTER_DESC AdapterDesc = {};
// check if a frame capture section version is supported
static const uint64_t CurrentVersion = 0x8;