summaryrefslogtreecommitdiffstats
path: root/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp')
-rwxr-xr-xgfx/angle/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp23
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)