Revert "Abolish absClear"
This reverts commit f948db6228fd8dce2ba2a6ff2dfec53ff95d3f90.
Reason for revert: Vulkan assertion on Nexus5
Original change's description:
> Abolish absClear
>
> Bug: skia:
> Change-Id: Ic4a0e640623677c06112d0735ffc5682049baf11
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240771
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com,michaelludwig@google.com
Change-Id: I071c9878d26ce0f1d91473ada48e9a702bb472de
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242480
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/GrOpsTask.cpp b/src/gpu/GrOpsTask.cpp
index cab3e8e..86bcf9b 100644
--- a/src/gpu/GrOpsTask.cpp
+++ b/src/gpu/GrOpsTask.cpp
@@ -507,6 +507,12 @@
}
bool GrOpsTask::resetForFullscreenClear(CanDiscardPreviousOps canDiscardPreviousOps) {
+ // Mark the color load op as discard (this may be followed by a clearColorOnLoad call to make
+ // the load op kClear, or it may be followed by an explicit op). In the event of an absClear()
+ // after a regular clear(), we could end up with a clear load op and a real clear op in the task
+ // if the load op were not reset here.
+ fColorLoadOp = GrLoadOp::kDiscard;
+
// If we previously recorded a wait op, we cannot delete the wait op. Until we track the wait
// ops separately from normal ops, we have to avoid clearing out any ops in this case as well.
if (fHasWaitOp) {