Bug 1595703 - Remove DXGI_USAGE_SHADER_INPUT usage r=gw
authorsotaro <sotaro.ikeda.g@gmail.com>
Tue, 12 Nov 2019 19:15:39 +0000
changeset 501685 6965500520e780708c1f1ccae7df92aee5d7d5ef
parent 501684 94d03e2199a4ff97f6677baa95df7fff7a286d5d
child 501686 530c4ab772a674e636b56cd5147a0773009cf9a3
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgw
bugs1595703
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1595703 - Remove DXGI_USAGE_SHADER_INPUT usage r=gw DXGI_USAGE_SHADER_INPUT is not necessary with current WebRender. Differential Revision: https://phabricator.services.mozilla.com/D52641
gfx/webrender_bindings/RenderCompositorANGLE.cpp
--- a/gfx/webrender_bindings/RenderCompositorANGLE.cpp
+++ b/gfx/webrender_bindings/RenderCompositorANGLE.cpp
@@ -179,20 +179,17 @@ bool RenderCompositorANGLE::Initialize()
     bool useTripleBuffering = false;
 
     DXGI_SWAP_CHAIN_DESC1 desc{};
     desc.Width = 0;
     desc.Height = 0;
     desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
     desc.SampleDesc.Count = 1;
     desc.SampleDesc.Quality = 0;
-    // DXGI_USAGE_SHADER_INPUT is set for improving performanc of copying from
-    // framebuffer to texture on intel gpu.
-    desc.BufferUsage =
-        DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_SHADER_INPUT;
+    desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
 
     if (gfx::gfxVars::UseWebRenderFlipSequentialWin()) {
       useTripleBuffering = gfx::gfxVars::UseWebRenderTripleBufferingWin();
       if (useTripleBuffering) {
         desc.BufferCount = 3;
       } else {
         desc.BufferCount = 2;
       }
@@ -219,20 +216,17 @@ bool RenderCompositorANGLE::Initialize()
     DXGI_SWAP_CHAIN_DESC swapDesc{};
     swapDesc.BufferDesc.Width = 0;
     swapDesc.BufferDesc.Height = 0;
     swapDesc.BufferDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
     swapDesc.BufferDesc.RefreshRate.Numerator = 60;
     swapDesc.BufferDesc.RefreshRate.Denominator = 1;
     swapDesc.SampleDesc.Count = 1;
     swapDesc.SampleDesc.Quality = 0;
-    // DXGI_USAGE_SHADER_INPUT is set for improving performanc of copying from
-    // framebuffer to texture on intel gpu.
-    swapDesc.BufferUsage =
-        DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_SHADER_INPUT;
+    swapDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
     swapDesc.BufferCount = 1;
     swapDesc.OutputWindow = hwnd;
     swapDesc.Windowed = TRUE;
     swapDesc.Flags = 0;
     swapDesc.SwapEffect = DXGI_SWAP_EFFECT_SEQUENTIAL;
 
     HRESULT hr = dxgiFactory->CreateSwapChain(dxgiDevice, &swapDesc,
                                               getter_AddRefs(mSwapChain));
@@ -334,19 +328,17 @@ RefPtr<IDXGISwapChain1> RenderCompositor
   DXGI_SWAP_CHAIN_DESC1 desc{};
   // DXGI does not like 0x0 swapchains. Swap chain creation failed when 0x0 was
   // set.
   desc.Width = 1;
   desc.Height = 1;
   desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
   desc.SampleDesc.Count = 1;
   desc.SampleDesc.Quality = 0;
-  // DXGI_USAGE_SHADER_INPUT is set for improving performanc of copying from
-  // framebuffer to texture on intel gpu.
-  desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_SHADER_INPUT;
+  desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
   if (aUseTripleBuffering) {
     desc.BufferCount = 3;
   } else {
     desc.BufferCount = 2;
   }
   // DXGI_SCALING_NONE caused swap chain creation failure.
   desc.Scaling = DXGI_SCALING_STRETCH;
   desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;