зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1692355 - [angle] Don't assert for non-sampleable non-ms sources in blitRenderbufferRect if we can CopySubResource. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D104940
This commit is contained in:
Родитель
4d192eb13a
Коммит
85ed84ba5f
|
@ -1,4 +1,4 @@
|
|||
#define ANGLE_COMMIT_HASH "9ee445bf2841"
|
||||
#define ANGLE_COMMIT_HASH "3778168311ca"
|
||||
#define ANGLE_COMMIT_HASH_SIZE 12
|
||||
#define ANGLE_COMMIT_DATE "2021-02-04 11:04:55 -0800"
|
||||
#define ANGLE_COMMIT_POSITION 14224
|
||||
#define ANGLE_COMMIT_DATE "2021-02-11 17:43:41 -0800"
|
||||
#define ANGLE_COMMIT_POSITION 14225
|
||||
|
|
|
@ -3466,46 +3466,6 @@ angle::Result Renderer11::blitRenderbufferRect(const gl::Context *context,
|
|||
RenderTarget11 *readRenderTarget11 = GetAs<RenderTarget11>(readRenderTarget);
|
||||
ASSERT(readRenderTarget11);
|
||||
|
||||
TextureHelper11 readTexture;
|
||||
unsigned int readSubresource = 0;
|
||||
d3d11::SharedSRV readSRV;
|
||||
|
||||
if (readRenderTarget->isMultisampled())
|
||||
{
|
||||
ANGLE_TRY(resolveMultisampledTexture(context, readRenderTarget11, depthBlit, stencilBlit,
|
||||
&readTexture));
|
||||
|
||||
if (!stencilBlit)
|
||||
{
|
||||
const auto &readFormatSet = readTexture.getFormatSet();
|
||||
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC viewDesc;
|
||||
viewDesc.Format = readFormatSet.srvFormat;
|
||||
viewDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
|
||||
viewDesc.Texture2D.MipLevels = 1;
|
||||
viewDesc.Texture2D.MostDetailedMip = 0;
|
||||
|
||||
ANGLE_TRY(allocateResource(GetImplAs<Context11>(context), viewDesc, readTexture.get(),
|
||||
&readSRV));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT(readRenderTarget11);
|
||||
readTexture = readRenderTarget11->getTexture();
|
||||
readSubresource = readRenderTarget11->getSubresourceIndex();
|
||||
readSRV = readRenderTarget11->getBlitShaderResourceView(context).makeCopy();
|
||||
if (!readSRV.valid())
|
||||
{
|
||||
ASSERT(depthBlit || stencilBlit);
|
||||
readSRV = readRenderTarget11->getShaderResourceView(context).makeCopy();
|
||||
}
|
||||
ASSERT(readSRV.valid());
|
||||
}
|
||||
|
||||
// Stencil blits don't use shaders.
|
||||
ASSERT(readSRV.valid() || stencilBlit);
|
||||
|
||||
const gl::Extents readSize(readRenderTarget->getWidth(), readRenderTarget->getHeight(), 1);
|
||||
const gl::Extents drawSize(drawRenderTarget->getWidth(), drawRenderTarget->getHeight(), 1);
|
||||
|
||||
|
@ -3621,11 +3581,55 @@ angle::Result Renderer11::blitRenderbufferRect(const gl::Context *context,
|
|||
bool partialDSBlit =
|
||||
(nativeFormat.depthBits > 0 && depthBlit) != (nativeFormat.stencilBits > 0 && stencilBlit);
|
||||
|
||||
if (drawRenderTarget->getSamples() == readRenderTarget->getSamples() &&
|
||||
const bool canCopySubresource =
|
||||
drawRenderTarget->getSamples() == readRenderTarget->getSamples() &&
|
||||
readRenderTarget11->getFormatSet().formatID ==
|
||||
drawRenderTarget11->getFormatSet().formatID &&
|
||||
!stretchRequired && !outOfBounds && !reversalRequired && !partialDSBlit &&
|
||||
!colorMaskingNeeded && (!(depthBlit || stencilBlit) || wholeBufferCopy))
|
||||
!colorMaskingNeeded && (!(depthBlit || stencilBlit) || wholeBufferCopy);
|
||||
|
||||
TextureHelper11 readTexture;
|
||||
unsigned int readSubresource = 0;
|
||||
d3d11::SharedSRV readSRV;
|
||||
|
||||
if (readRenderTarget->isMultisampled())
|
||||
{
|
||||
ANGLE_TRY(resolveMultisampledTexture(context, readRenderTarget11, depthBlit, stencilBlit,
|
||||
&readTexture));
|
||||
|
||||
if (!stencilBlit && !canCopySubresource)
|
||||
{
|
||||
const auto &readFormatSet = readTexture.getFormatSet();
|
||||
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC viewDesc;
|
||||
viewDesc.Format = readFormatSet.srvFormat;
|
||||
viewDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
|
||||
viewDesc.Texture2D.MipLevels = 1;
|
||||
viewDesc.Texture2D.MostDetailedMip = 0;
|
||||
|
||||
ANGLE_TRY(allocateResource(GetImplAs<Context11>(context), viewDesc, readTexture.get(),
|
||||
&readSRV));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT(readRenderTarget11);
|
||||
readTexture = readRenderTarget11->getTexture();
|
||||
readSubresource = readRenderTarget11->getSubresourceIndex();
|
||||
|
||||
if (!canCopySubresource)
|
||||
{
|
||||
readSRV = readRenderTarget11->getBlitShaderResourceView(context).makeCopy();
|
||||
if (!readSRV.valid())
|
||||
{
|
||||
ASSERT(depthBlit || stencilBlit);
|
||||
readSRV = readRenderTarget11->getShaderResourceView(context).makeCopy();
|
||||
}
|
||||
ASSERT(readSRV.valid());
|
||||
}
|
||||
}
|
||||
|
||||
if (canCopySubresource)
|
||||
{
|
||||
UINT dstX = drawRect.x;
|
||||
UINT dstY = drawRect.y;
|
||||
|
|
|
@ -1,4 +1,15 @@
|
|||
commit 9ee445bf28419a05d19cfc9caccc0e1c795c6149
|
||||
commit 3778168311ca10e8d57b3bce16bfcbc0f5b0dd01
|
||||
Author: Jeff Gilbert <jdashg@gmail.com>
|
||||
Date: Thu Feb 11 17:34:00 2021 -0800
|
||||
|
||||
Don't assert for non-sampleable non-ms sources in blitRenderbufferRect if we can CopySubResource.
|
||||
|
||||
In Firefox, we can have a source from DirectComposition without
|
||||
D3D11_BIND_SHADER_RESOURCE. This is fine so long as our formats etc
|
||||
match enough to hit the CopySubResource path.
|
||||
Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1692355
|
||||
|
||||
commit f96c68edb00194eebccd998cfd4ceb7207810092
|
||||
Author: Jeff Gilbert <jdashg@gmail.com>
|
||||
Date: Wed Feb 3 18:50:38 2021 -0800
|
||||
|
||||
|
@ -6,13 +17,13 @@ Date: Wed Feb 3 18:50:38 2021 -0800
|
|||
|
||||
Build system logic is really hard to handle when vendoring into Gecko for Firefox.
|
||||
|
||||
commit 00fc0892abedd5d5f0a7167ddf4431f7bb727486
|
||||
commit 2a40d0f143e00c46db28c664678529a36daf4e41
|
||||
Author: Jeff Gilbert <jdashg@gmail.com>
|
||||
Date: Mon Feb 1 17:35:56 2021 -0800
|
||||
|
||||
Build fixes needed by Gecko.
|
||||
|
||||
commit 43dc75e84ad5d0b8255c3dcfec2efa2a3d017827
|
||||
commit 226aa28ce47cf20769f8f27f23255ca1eca83942
|
||||
Author: Jeff Muizelaar <jrmuizel@gmail.com>
|
||||
Date: Mon Nov 9 17:09:12 2020 -0500
|
||||
|
||||
|
@ -20,7 +31,7 @@ Date: Mon Nov 9 17:09:12 2020 -0500
|
|||
|
||||
This lets us run WebRender on devices that only support D3D 10.0
|
||||
|
||||
commit fffb2aa74832466f2433acb3f05a0b498f0a6350
|
||||
commit c0645aac0a4b4ad6bc9691ce381e5043115737b5
|
||||
Author: Jeff Muizelaar <jrmuizel@gmail.com>
|
||||
Date: Wed May 6 14:04:42 2020 -0400
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче