Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit dd04bec

Browse files
brianosmanSkia Commit-Bot
authored andcommitted
Add a version of the skbug6653 unit test that disables explicit resource allocation
We now suspect this bug is in Ganesh, so we're looking to see if this is related. Bug: skia:6653 Change-Id: Ic1c61091437903d1ffe0eba4a9f90dae01cedef7 Reviewed-on: https://skia-review.googlesource.com/149440 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
1 parent cd700e9 commit dd04bec

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

tests/skbug6653.cpp

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "SkSurface.h"
1212

1313
#include "GrContext.h"
14+
#include "GrContextPriv.h"
1415
#include "GrTest.h"
1516
#include "Test.h"
1617

@@ -29,10 +30,7 @@ static sk_sp<SkSurface> make_surface(GrContext* context) {
2930
kBottomLeft_GrSurfaceOrigin, nullptr);
3031
}
3132

32-
// Tests that readPixels returns up-to-date results. Demonstrates a bug on Galaxy S6
33-
// (Mali T760), in MSAA mode.
34-
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(skbug6653, reporter, ctxInfo) {
35-
GrContext* ctx = ctxInfo.grContext();
33+
static void test_bug_6653(GrContext* ctx, skiatest::Reporter* reporter) {
3634
SkRect rect = SkRect::MakeWH(50, 50);
3735

3836
SkPaint paint;
@@ -94,3 +92,18 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(skbug6653, reporter, ctxInfo) {
9492
REPORTER_ASSERT(reporter, match);
9593
}
9694
}
95+
96+
// Tests that readPixels returns up-to-date results. This has failed on several GPUs,
97+
// from multiple vendors, in MSAA mode.
98+
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(skbug6653, reporter, ctxInfo) {
99+
GrContext* ctx = ctxInfo.grContext();
100+
test_bug_6653(ctx, reporter);
101+
}
102+
103+
// Same as above, but without explicit resource allocation.
104+
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(skbug6653_noExplicitResourceAllocation, reporter, ctxInfo) {
105+
GrContext* ctx = ctxInfo.grContext();
106+
ctx->flush();
107+
ctx->contextPriv().resourceProvider()->testingOnly_setExplicitlyAllocateGPUResources(false);
108+
test_bug_6653(ctx, reporter);
109+
}

0 commit comments

Comments
 (0)