diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-07-11 23:29:50 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-07-11 23:31:02 +0200 |
commit | 70dd5e7c66b1fe3f82e5b4db2406050baba15f05 (patch) | |
tree | 3f012200ef3c934f33db1a4ef2b790fae3141860 /gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp | |
parent | 3b7ffb477eec078c7036c92c6a51bb5de6de4f28 (diff) | |
parent | 8481fa25d246f1968d0a254ee3c6cdd82c60781a (diff) | |
download | UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.tar UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.tar.gz UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.tar.lz UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.tar.xz UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.zip |
Merge branch 'ANGLE-rollback'
This resolves #624
Note: Cherry-picked some fixes on top of the ANGLE version that we want to keep.
Diffstat (limited to 'gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp')
-rwxr-xr-x | gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp index 90922914a..4e67fa1ef 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp @@ -29,7 +29,7 @@ namespace rx namespace { -gl::Error MarkAttachmentsDirty(const gl::FramebufferAttachment *attachment) +gl::Error InvalidateAttachmentSwizzles(const gl::FramebufferAttachment *attachment) { if (attachment && attachment->type() == GL_TEXTURE) { @@ -45,7 +45,7 @@ gl::Error MarkAttachmentsDirty(const gl::FramebufferAttachment *attachment) TextureStorage11 *texStorage11 = GetAs<TextureStorage11>(texStorage); ASSERT(texStorage11); - texStorage11->markLevelDirty(attachment->mipLevel()); + texStorage11->invalidateSwizzleCacheLevel(attachment->mipLevel()); } } @@ -89,18 +89,18 @@ Framebuffer11::~Framebuffer11() { } -gl::Error Framebuffer11::markAttachmentsDirty() const +gl::Error Framebuffer11::invalidateSwizzles() const { for (const auto &colorAttachment : mState.getColorAttachments()) { if (colorAttachment.isAttached()) { - ANGLE_TRY(MarkAttachmentsDirty(&colorAttachment)); + ANGLE_TRY(InvalidateAttachmentSwizzles(&colorAttachment)); } } - ANGLE_TRY(MarkAttachmentsDirty(mState.getDepthAttachment())); - ANGLE_TRY(MarkAttachmentsDirty(mState.getStencilAttachment())); + ANGLE_TRY(InvalidateAttachmentSwizzles(mState.getDepthAttachment())); + ANGLE_TRY(InvalidateAttachmentSwizzles(mState.getStencilAttachment())); return gl::NoError(); } @@ -128,7 +128,7 @@ gl::Error Framebuffer11::clearImpl(ContextImpl *context, const ClearParameters & ANGLE_TRY(clearer->clearFramebuffer(clearParams, mState)); } - ANGLE_TRY(markAttachmentsDirty()); + ANGLE_TRY(invalidateSwizzles()); return gl::NoError(); } @@ -182,10 +182,7 @@ gl::Error Framebuffer11::invalidateBase(size_t count, const GLenum *attachments, size_t colorIndex = (attachments[i] == GL_COLOR ? 0u : (attachments[i] - GL_COLOR_ATTACHMENT0)); auto colorAttachment = mState.getColorAttachment(colorIndex); - if (colorAttachment) - { - ANGLE_TRY(invalidateAttachment(colorAttachment)); - } + ANGLE_TRY(invalidateAttachment(colorAttachment)); break; } } @@ -354,14 +351,14 @@ gl::Error Framebuffer11::blitImpl(const gl::Rectangle &sourceArea, blitDepth, blitStencil)); } - ANGLE_TRY(markAttachmentsDirty()); + ANGLE_TRY(invalidateSwizzles()); return gl::NoError(); } GLenum Framebuffer11::getRenderTargetImplementationFormat(RenderTargetD3D *renderTarget) const { RenderTarget11 *renderTarget11 = GetAs<RenderTarget11>(renderTarget); - return renderTarget11->getFormatSet().format().fboImplementationInternalFormat; + return renderTarget11->getFormatSet().format.fboImplementationInternalFormat; } void Framebuffer11::updateColorRenderTarget(size_t colorIndex) |