Make D3D11 work with outdated DXSDK.
This commit is contained in:
parent
a3a1127b4f
commit
4bc2df890a
@ -799,6 +799,11 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|||||||
if (m_featureLevel == D3D_FEATURE_LEVEL_10_0
|
if (m_featureLevel == D3D_FEATURE_LEVEL_10_0
|
||||||
|| m_featureLevel == D3D_FEATURE_LEVEL_10_1)
|
|| m_featureLevel == D3D_FEATURE_LEVEL_10_1)
|
||||||
{
|
{
|
||||||
|
struct D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS
|
||||||
|
{
|
||||||
|
BOOL ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x;
|
||||||
|
};
|
||||||
|
|
||||||
D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS data;
|
D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS data;
|
||||||
hr = m_device->CheckFeatureSupport(D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS, &data, sizeof(data) );
|
hr = m_device->CheckFeatureSupport(D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS, &data, sizeof(data) );
|
||||||
if (SUCCEEDED(hr)
|
if (SUCCEEDED(hr)
|
||||||
@ -819,8 +824,13 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
struct D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT
|
||||||
|
{
|
||||||
|
BOOL SimpleInstancingSupported;
|
||||||
|
};
|
||||||
|
|
||||||
D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT data;
|
D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT data;
|
||||||
hr = m_device->CheckFeatureSupport(D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT, &data, sizeof(data) );
|
hr = m_device->CheckFeatureSupport(D3D11_FEATURE(11) /*D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT*/, &data, sizeof(data) );
|
||||||
if (SUCCEEDED(hr)
|
if (SUCCEEDED(hr)
|
||||||
&& data.SimpleInstancingSupported)
|
&& data.SimpleInstancingSupported)
|
||||||
{
|
{
|
||||||
@ -831,8 +841,13 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|||||||
// shadow compare is optional on 9_1 through 9_3 targets
|
// shadow compare is optional on 9_1 through 9_3 targets
|
||||||
if (m_featureLevel <= D3D_FEATURE_LEVEL_9_3)
|
if (m_featureLevel <= D3D_FEATURE_LEVEL_9_3)
|
||||||
{
|
{
|
||||||
|
struct D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT
|
||||||
|
{
|
||||||
|
BOOL SupportsDepthAsTextureWithLessEqualComparisonFilter;
|
||||||
|
};
|
||||||
|
|
||||||
D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT data;
|
D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT data;
|
||||||
hr = m_device->CheckFeatureSupport(D3D11_FEATURE_D3D9_SHADOW_SUPPORT, &data, sizeof(data) );
|
hr = m_device->CheckFeatureSupport(D3D11_FEATURE(9) /*D3D11_FEATURE_D3D9_SHADOW_SUPPORT*/, &data, sizeof(data) );
|
||||||
if (SUCCEEDED(hr)
|
if (SUCCEEDED(hr)
|
||||||
&& data.SupportsDepthAsTextureWithLessEqualComparisonFilter)
|
&& data.SupportsDepthAsTextureWithLessEqualComparisonFilter)
|
||||||
{
|
{
|
||||||
@ -846,6 +861,12 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|||||||
|
|
||||||
if (DXGI_FORMAT_UNKNOWN != s_textureFormat[ii].m_fmt)
|
if (DXGI_FORMAT_UNKNOWN != s_textureFormat[ii].m_fmt)
|
||||||
{
|
{
|
||||||
|
struct D3D11_FEATURE_DATA_FORMAT_SUPPORT
|
||||||
|
{
|
||||||
|
DXGI_FORMAT InFormat;
|
||||||
|
UINT OutFormatSupport;
|
||||||
|
};
|
||||||
|
|
||||||
D3D11_FEATURE_DATA_FORMAT_SUPPORT data; // D3D11_FEATURE_DATA_FORMAT_SUPPORT2
|
D3D11_FEATURE_DATA_FORMAT_SUPPORT data; // D3D11_FEATURE_DATA_FORMAT_SUPPORT2
|
||||||
data.InFormat = s_textureFormat[ii].m_fmt;
|
data.InFormat = s_textureFormat[ii].m_fmt;
|
||||||
hr = m_device->CheckFeatureSupport(D3D11_FEATURE_FORMAT_SUPPORT, &data, sizeof(data) );
|
hr = m_device->CheckFeatureSupport(D3D11_FEATURE_FORMAT_SUPPORT, &data, sizeof(data) );
|
||||||
|
@ -74,36 +74,6 @@ BX_PRAGMA_DIAGNOSTIC_POP()
|
|||||||
# ifndef D3D11_REQ_MAXANISOTROPY
|
# ifndef D3D11_REQ_MAXANISOTROPY
|
||||||
# define D3D11_REQ_MAXANISOTROPY 16
|
# define D3D11_REQ_MAXANISOTROPY 16
|
||||||
# endif // D3D11_REQ_MAXANISOTROPY
|
# endif // D3D11_REQ_MAXANISOTROPY
|
||||||
|
|
||||||
struct D3D11_FEATURE_DATA_FORMAT_SUPPORT
|
|
||||||
{
|
|
||||||
DXGI_FORMAT InFormat;
|
|
||||||
UINT OutFormatSupport;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct D3D11_FEATURE_DATA_FORMAT_SUPPORT2
|
|
||||||
{
|
|
||||||
DXGI_FORMAT InFormat;
|
|
||||||
UINT OutFormatSupport2;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS
|
|
||||||
{
|
|
||||||
BOOL ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define D3D11_FEATURE_D3D9_SHADOW_SUPPORT D3D11_FEATURE(9)
|
|
||||||
struct D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT
|
|
||||||
{
|
|
||||||
BOOL SupportsDepthAsTextureWithLessEqualComparisonFilter;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT D3D11_FEATURE(11)
|
|
||||||
struct D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT
|
|
||||||
{
|
|
||||||
BOOL SimpleInstancingSupported;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // __MINGW32__
|
#endif // __MINGW32__
|
||||||
|
|
||||||
namespace bgfx { namespace d3d11
|
namespace bgfx { namespace d3d11
|
||||||
|
Loading…
Reference in New Issue
Block a user