Revert "Fix texture barriers on DMSAA"
This reverts commit 1a3f4ab4901c2294d13c785717655ce059eb42fa.
Reason for revert: breaking dmsaa test on intel hd405, https://ci.chromium.org/raw/build/logs.chromium.org/skia/54538c41f1c1b111/+/annotations
Original change's description:
> Fix texture barriers on DMSAA
>
> Bug: skia:11396
> Change-Id: Iad74958c05ed086fe85656b9dc5418d5ab4589e7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419838
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com
Change-Id: I8be8107a98584dfb7f831a296078753fecfcebcf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11396
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421056
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrOpsTask.cpp b/src/gpu/GrOpsTask.cpp
index 623084a..9e00676 100644
--- a/src/gpu/GrOpsTask.cpp
+++ b/src/gpu/GrOpsTask.cpp
@@ -442,8 +442,7 @@
// can end up with GrOpsTasks that only have a discard load op and no ops. For vulkan validation
// we need to keep that discard and not drop it. Once we have reduce op list splitting enabled
// we shouldn't end up with GrOpsTasks with only discard.
- if (this->isColorNoOp() ||
- (fClippedContentBounds.isEmpty() && fColorLoadOp != GrLoadOp::kDiscard)) {
+ if (this->isNoOp() || (fClippedContentBounds.isEmpty() && fColorLoadOp != GrLoadOp::kDiscard)) {
return;
}
TRACE_EVENT0("skia.gpu", TRACE_FUNC);
@@ -468,8 +467,7 @@
// can end up with GrOpsTasks that only have a discard load op and no ops. For vulkan validation
// we need to keep that discard and not drop it. Once we have reduce op list splitting enabled
// we shouldn't end up with GrOpsTasks with only discard.
- if (this->isColorNoOp() ||
- (fClippedContentBounds.isEmpty() && fColorLoadOp != GrLoadOp::kDiscard)) {
+ if (this->isNoOp() || (fClippedContentBounds.isEmpty() && fColorLoadOp != GrLoadOp::kDiscard)) {
return;
}
TRACE_EVENT0("skia.gpu", TRACE_FUNC);
@@ -550,8 +548,7 @@
// can end up with GrOpsTasks that only have a discard load op and no ops. For vulkan validation
// we need to keep that discard and not drop it. Once we have reduce op list splitting enabled
// we shouldn't end up with GrOpsTasks with only discard.
- if (this->isColorNoOp() ||
- (fClippedContentBounds.isEmpty() && fColorLoadOp != GrLoadOp::kDiscard)) {
+ if (this->isNoOp() || (fClippedContentBounds.isEmpty() && fColorLoadOp != GrLoadOp::kDiscard)) {
return false;
}
@@ -687,17 +684,12 @@
fRenderPassXferBarriers = GrXferBarrierFlags::kNone;
}
-bool GrOpsTask::canMerge(const GrOpsTask* opsTask) const {
- return this->target(0) == opsTask->target(0) &&
- fArenas == opsTask->fArenas &&
- !opsTask->fCannotMergeBackward;
-}
-
int GrOpsTask::mergeFrom(SkSpan<const sk_sp<GrRenderTask>> tasks) {
int mergedCount = 0;
for (const sk_sp<GrRenderTask>& task : tasks) {
auto opsTask = task->asOpsTask();
- if (!opsTask || !this->canMerge(opsTask)) {
+ if (!opsTask || opsTask->target(0) != this->target(0)
+ || this->fArenas != opsTask->fArenas) {
break;
}
SkASSERT(fTargetSwizzle == opsTask->fTargetSwizzle);
@@ -879,7 +871,7 @@
this->deleteOps();
fDeferredProxies.reset();
fColorLoadOp = GrLoadOp::kLoad;
- SkASSERT(this->isColorNoOp());
+ SkASSERT(this->isNoOp());
}
bool GrOpsTask::onIsUsed(GrSurfaceProxy* proxyToCheck) const {
@@ -906,7 +898,7 @@
void GrOpsTask::gatherProxyIntervals(GrResourceAllocator* alloc) const {
SkASSERT(this->isClosed());
- if (this->isColorNoOp()) {
+ if (this->isNoOp()) {
return;
}
@@ -1051,7 +1043,7 @@
GrRenderTask::ExpectedOutcome GrOpsTask::onMakeClosed(const GrCaps& caps,
SkIRect* targetUpdateBounds) {
this->forwardCombine(caps);
- if (!this->isColorNoOp()) {
+ if (!this->isNoOp()) {
GrSurfaceProxy* proxy = this->target(0);
// Use the entire backing store bounds since the GPU doesn't clip automatically to the
// logical dimensions.