aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLGpu.cpp
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2016-08-31 07:37:31 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-31 07:37:31 -0700
commit4bcd62e3313da60c3aa96ccd12b7ea440c7266d4 (patch)
tree695930fc9669667b6dfb4073c107560d3d9b41d1 /src/gpu/gl/GrGLGpu.cpp
parent272b311298d78569c88130ceee3096b876fcbf25 (diff)
Add some copy support for vulkan msaa
This allows us to do copies from: msaa->msaa with same sample count msaa->no-msaa with a resolve Still missing support for no-msaa to msaa which will require a copyAsDraw which is currently stalled and fixing possible driver bugs. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2294533002 Review-Url: https://codereview.chromium.org/2294533002
Diffstat (limited to 'src/gpu/gl/GrGLGpu.cpp')
-rw-r--r--src/gpu/gl/GrGLGpu.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 9981b66075..1370bf992b 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -3586,7 +3586,7 @@ void GrGLGpu::unbindTextureFBOForCopy(GrGLenum fboTarget, GrSurface* surface) {
}
}
-bool GrGLGpu::initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const {
+bool GrGLGpu::initDescForDstCopy(const GrRenderTarget* src, GrSurfaceDesc* desc) const {
// If the src is a texture, we can implement the blit as a draw assuming the config is
// renderable.
if (src->asTexture() && this->caps()->isConfigRenderable(src->config(), false)) {
@@ -3625,13 +3625,10 @@ bool GrGLGpu::initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc)
return true;
}
return false;
- } else if (nullptr == src->asRenderTarget()) {
- // CopyTexSubImage2D or fbo blit would require creating a temp fbo for the src.
- return false;
}
- const GrGLRenderTarget* srcRT = static_cast<const GrGLRenderTarget*>(src->asRenderTarget());
- if (srcRT && srcRT->renderFBOID() != srcRT->textureFBOID()) {
+ const GrGLRenderTarget* srcRT = static_cast<const GrGLRenderTarget*>(src);
+ if (srcRT->renderFBOID() != srcRT->textureFBOID()) {
// It's illegal to call CopyTexSubImage2D on a MSAA renderbuffer. Set up for FBO blit or
// fail.
if (this->caps()->isConfigRenderable(src->config(), false)) {