Bug 1371190 - (Rebase)
Bug 1347866 - Part3: ANGLE patch uplift for bug1325733
MozReview-Commit-ID: F9QiJ3hDuoZ
--HG--
extra : rebase_source : bce9e62497c8699ac65d81e0cc2d101a36743d7a
--- a/gfx/angle/include/platform/WorkaroundsD3D.h
+++ b/gfx/angle/include/platform/WorkaroundsD3D.h
@@ -95,17 +95,17 @@ struct WorkaroundsD3D
// this bug, we use an expression to emulate function isnan().
// Tracking bug: https://crbug.com/650547
// This driver bug is fixed in 21.20.16.4542.
bool emulateIsnanFloat = false;
// On some Intel drivers, using clear() may not take effect. One of such situation is to clear
// a target with width or height < 16. To work around this bug, we call clear() twice on these
// platforms. Tracking bug: https://crbug.com/655534
- bool callClearTwiceOnSmallTarget = false;
+ bool callClearTwice = false;
// On some Intel drivers, copying from staging storage to constant buffer storage does not
// seem to work. Work around this by keeping system memory storage as a canonical reference
// for buffer data.
// D3D11-only workaround. See http://crbug.com/593024.
bool useSystemMemoryForConstantBuffers = false;
// This workaround is for the ANGLE_multiview extension. If enabled the viewport or render
--- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Clear11.cpp
+++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Clear11.cpp
@@ -592,35 +592,29 @@ gl::Error Clear11::clearFramebuffer(cons
if (needScissoredClear)
{
// We shouldn't reach here if deviceContext1 is unavailable.
ASSERT(deviceContext1);
// There must be at least one scissor rectangle.
ASSERT(!scissorRects.empty());
deviceContext1->ClearView(framebufferRTV.get(), clearValues, scissorRects.data(),
static_cast<UINT>(scissorRects.size()));
- if (mRenderer->getWorkarounds().callClearTwiceOnSmallTarget)
+ if (mRenderer->getWorkarounds().callClearTwice)
{
- if (clearParams.scissor.width <= 16 || clearParams.scissor.height <= 16)
- {
- deviceContext1->ClearView(framebufferRTV.get(), clearValues,
- scissorRects.data(),
- static_cast<UINT>(scissorRects.size()));
- }
+ deviceContext1->ClearView(framebufferRTV.get(), clearValues,
+ scissorRects.data(),
+ static_cast<UINT>(scissorRects.size()));
}
}
else
{
deviceContext->ClearRenderTargetView(framebufferRTV.get(), clearValues);
- if (mRenderer->getWorkarounds().callClearTwiceOnSmallTarget)
+ if (mRenderer->getWorkarounds().callClearTwice)
{
- if (framebufferSize.width <= 16 || framebufferSize.height <= 16)
- {
- deviceContext->ClearRenderTargetView(framebufferRTV.get(), clearValues);
- }
+ deviceContext->ClearRenderTargetView(framebufferRTV.get(), clearValues);
}
}
}
}
ID3D11DepthStencilView *dsv = nullptr;
if (clearParams.clearDepth || clearParams.clearStencil)
--- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp
+++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp
@@ -2078,17 +2078,17 @@ angle::WorkaroundsD3D GenerateWorkaround
if (IsIntel(adapterDesc.VendorId))
{
workarounds.preAddTexelFetchOffsets = true;
workarounds.useSystemMemoryForConstantBuffers = true;
workarounds.disableB5G6R5Support =
d3d11_gl::GetIntelDriverVersion(deviceCaps.driverVersion) < IntelDriverVersion(4539);
if (IsSkylake(adapterDesc.DeviceId))
{
- workarounds.callClearTwiceOnSmallTarget =
+ workarounds.callClearTwice =
d3d11_gl::GetIntelDriverVersion(deviceCaps.driverVersion) <
IntelDriverVersion(4771);
workarounds.emulateIsnanFloat =
d3d11_gl::GetIntelDriverVersion(deviceCaps.driverVersion) <
IntelDriverVersion(4542);
}
else if (IsBroadwell(adapterDesc.DeviceId) || IsHaswell(adapterDesc.DeviceId))
{