aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-04-20 11:52:43 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-20 16:30:15 +0000
commitdbdba60274515c4df02cb667d2f8e2738418855f (patch)
tree3e7b82b8898995531502f9ef585319dd81af92a7 /src/gpu/vk
parentcb7b83113ba1f6add188d08e99181db46949bd18 (diff)
Add discard check when deciding if we should execute op list or not.
Bug: skia:7828 Change-Id: I339ba64b6312cd9444cd4faffd426d91852774e9 Reviewed-on: https://skia-review.googlesource.com/122784 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/vk')
-rw-r--r--src/gpu/vk/GrVkGpuCommandBuffer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gpu/vk/GrVkGpuCommandBuffer.cpp b/src/gpu/vk/GrVkGpuCommandBuffer.cpp
index bcaeb604c6..5493dd9890 100644
--- a/src/gpu/vk/GrVkGpuCommandBuffer.cpp
+++ b/src/gpu/vk/GrVkGpuCommandBuffer.cpp
@@ -190,6 +190,13 @@ void GrVkGpuRTCommandBuffer::submit() {
continue;
}
+ // Make sure if we only have a discard load that we execute the discard on the whole image.
+ // TODO: Once we improve our tracking of discards so that we never end up flushing a discard
+ // call with no actually ops, remove this.
+ if (cbInfo.fIsEmpty && cbInfo.fLoadStoreState == LoadStoreState::kStartsWithDiscard) {
+ cbInfo.fBounds = SkRect::MakeWH(vkRT->width(), vkRT->height());
+ }
+
if (cbInfo.fBounds.intersect(0, 0,
SkIntToScalar(fRenderTarget->width()),
SkIntToScalar(fRenderTarget->height()))) {