Commit 20c285ec by Jeff Gilbert Committed by Commit Bot

callClearTwiceOnSmallTarget is needed for all sizes.

Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1325733 BUG=angleproject:2214 Change-Id: I6837a0fbf0bbbd0877f333f0625729445a5999aa Reviewed-on: https://chromium-review.googlesource.com/748320Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 1f0b468c
......@@ -97,10 +97,10 @@ struct WorkaroundsD3D
// 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;
// On some Intel drivers, using clear() may not take effect. To work around this bug, we call
// clear() twice on these platforms.
// Tracking bug: https://crbug.com/655534
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
......
......@@ -596,25 +596,19 @@ gl::Error Clear11::clearFramebuffer(const gl::Context *context,
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);
}
}
}
......
......@@ -2136,7 +2136,7 @@ angle::WorkaroundsD3D GenerateWorkarounds(const Renderer11DeviceCaps &deviceCaps
d3d11_gl::GetIntelDriverVersion(deviceCaps.driverVersion) < IntelDriverVersion(4539);
if (IsSkylake(adapterDesc.DeviceId))
{
workarounds.callClearTwiceOnSmallTarget =
workarounds.callClearTwice =
d3d11_gl::GetIntelDriverVersion(deviceCaps.driverVersion) <
IntelDriverVersion(4771);
workarounds.emulateIsnanFloat =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment