Browse Source

Fixing D3D11 device creation issues on downlevel hardware.

Mike Popoloski 11 years ago
parent
commit
850059c1cd
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/renderer_d3d11.cpp

+ 9 - 1
src/renderer_d3d11.cpp

@@ -663,9 +663,13 @@ RENDERDOC_IMPORT
 
 
 			D3D_FEATURE_LEVEL features[] =
 			D3D_FEATURE_LEVEL features[] =
 			{
 			{
+                D3D_FEATURE_LEVEL_11_1,
 				D3D_FEATURE_LEVEL_11_0,
 				D3D_FEATURE_LEVEL_11_0,
 				D3D_FEATURE_LEVEL_10_1,
 				D3D_FEATURE_LEVEL_10_1,
 				D3D_FEATURE_LEVEL_10_0,
 				D3D_FEATURE_LEVEL_10_0,
+                D3D_FEATURE_LEVEL_9_3,
+                D3D_FEATURE_LEVEL_9_2,
+                D3D_FEATURE_LEVEL_9_1
 			};
 			};
 
 
 			uint32_t flags = D3D11_CREATE_DEVICE_SINGLETHREADED
 			uint32_t flags = D3D11_CREATE_DEVICE_SINGLETHREADED
@@ -679,7 +683,7 @@ RENDERDOC_IMPORT
 				, NULL
 				, NULL
 				, flags
 				, flags
 				, features
 				, features
-				, 1
+				, ARRAYSIZE(features)
 				, D3D11_SDK_VERSION
 				, D3D11_SDK_VERSION
 				, &m_device
 				, &m_device
 				, &featureLevel
 				, &featureLevel
@@ -1253,6 +1257,10 @@ RENDERDOC_IMPORT
 			{
 			{
 				HRESULT hr = S_OK;
 				HRESULT hr = S_OK;
 				uint32_t syncInterval = !!(m_flags & BGFX_RESET_VSYNC);
 				uint32_t syncInterval = !!(m_flags & BGFX_RESET_VSYNC);
+#if BX_PLATFORM_WINRT
+                syncInterval = 1;   // sync interval of 0 is not supported on WinRT
+#endif
+
 				for (uint32_t ii = 1, num = m_numWindows; ii < num && SUCCEEDED(hr); ++ii)
 				for (uint32_t ii = 1, num = m_numWindows; ii < num && SUCCEEDED(hr); ++ii)
 				{
 				{
 					hr = m_frameBuffers[m_windows[ii].idx].m_swapChain->Present(syncInterval, 0);
 					hr = m_frameBuffers[m_windows[ii].idx].m_swapChain->Present(syncInterval, 0);