Backed out changeset 3e5a825eac7d (bug 1371190)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 06 Oct 2017 15:29:17 +0200
changeset 427344 62686b7f1f2a37c78da85da9ad0ab57f876dc0a9
parent 427343 ae117635bbf059868fc9bacc791afb75042dd7ec
child 427345 cea32e55bad6819dcd634bd426ddcec9af6fd32b
push id97
push userfmarier@mozilla.com
push dateSat, 14 Oct 2017 01:12:59 +0000
bugs1371190
milestone58.0a1
backs out3e5a825eac7d6b07cc6c56a414ab4087030d8ef7
Backed out changeset 3e5a825eac7d (bug 1371190)
gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
--- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
+++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
@@ -772,55 +772,32 @@ egl::Error Renderer11::initializeD3DDevi
         {
             TRACE_EVENT0("gpu.angle", "D3D11CreateDevice (Debug)");
             result = D3D11CreateDevice(nullptr, mRequestedDriverType, nullptr,
                                        D3D11_CREATE_DEVICE_DEBUG, mAvailableFeatureLevels.data(),
                                        static_cast<unsigned int>(mAvailableFeatureLevels.size()),
                                        D3D11_SDK_VERSION, &mDevice,
                                        &(mRenderer11DeviceCaps.featureLevel), &mDeviceContext);
 
-            if (result == E_INVALIDARG &&
-                mAvailableFeatureLevels[0] == D3D_FEATURE_LEVEL_11_1)
-            {
-                // In some older Windows platform, D3D11.1 is not supported which returns E_INVALIDARG
-                // so we omit the 11.1 feature level flag and try again
-                result = D3D11CreateDevice(nullptr, mRequestedDriverType, nullptr,
-                                           D3D11_CREATE_DEVICE_DEBUG, mAvailableFeatureLevels.data()+1,
-                                           static_cast<unsigned int>(mAvailableFeatureLevels.size())-1,
-                                           D3D11_SDK_VERSION, &mDevice,
-                                           &(mRenderer11DeviceCaps.featureLevel), &mDeviceContext);
-            }
-
             if (!mDevice || FAILED(result))
             {
                 WARN() << "Failed creating Debug D3D11 device - falling back to release runtime.";
             }
         }
 
         if (!mDevice || FAILED(result))
         {
             SCOPED_ANGLE_HISTOGRAM_TIMER("GPU.ANGLE.D3D11CreateDeviceMS");
             TRACE_EVENT0("gpu.angle", "D3D11CreateDevice");
 
             result = D3D11CreateDevice(
                 nullptr, mRequestedDriverType, nullptr, 0, mAvailableFeatureLevels.data(),
                 static_cast<unsigned int>(mAvailableFeatureLevels.size()), D3D11_SDK_VERSION,
                 &mDevice, &(mRenderer11DeviceCaps.featureLevel), &mDeviceContext);
 
-            if (result == E_INVALIDARG &&
-                mAvailableFeatureLevels[0] == D3D_FEATURE_LEVEL_11_1)
-            {
-                // In some older Windows platform, D3D11.1 is not supported which returns E_INVALIDARG
-                // so we omit the 11.1 feature level flag and try again
-                result = D3D11CreateDevice(
-                    nullptr, mRequestedDriverType, nullptr, 0, mAvailableFeatureLevels.data()+1,
-                    static_cast<unsigned int>(mAvailableFeatureLevels.size())-1, D3D11_SDK_VERSION,
-                    &mDevice, &(mRenderer11DeviceCaps.featureLevel), &mDeviceContext);
-            }
-
             // Cleanup done by destructor
             if (!mDevice || FAILED(result))
             {
                 ANGLE_HISTOGRAM_SPARSE_SLOWLY("GPU.ANGLE.D3D11CreateDeviceError",
                                               static_cast<int>(result));
                 return egl::EglNotInitialized(D3D11_INIT_CREATEDEVICE_ERROR)
                        << "Could not create D3D11 device.";
             }