diff options
author | 2013-02-04 18:39:24 +0000 | |
---|---|---|
committer | 2013-02-04 18:39:24 +0000 | |
commit | 042a2861b2aa7a7a9fff12503a4b297d6ee1d335 (patch) | |
tree | f038f8f28debc9860c3ab7c7a34b4ac9dfa6d0f4 | |
parent | 60040292be58ac553298209fb2e0684a4cb17dcc (diff) |
Attempt to fix GLPrograms test on ANGLE bot.
R=senorblanco@chromium.org
Review URL: https://codereview.appspot.com/7281050
git-svn-id: http://skia.googlecode.com/svn/trunk@7550 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | tests/GLProgramsTest.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index b93f9c3269..830f38db12 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -44,7 +44,9 @@ const GrEffectRef* create_random_effect(SkRandom* random, } } -bool GrGpuGL::programUnitTest() { +bool GrGpuGL::programUnitTest(int maxStages) { + + maxStages = GrMin(maxStages, (int)GrDrawState::kNumStages); GrTextureDesc dummyDesc; dummyDesc.fConfig = kSkia8888_PM_GrPixelConfig; @@ -152,8 +154,15 @@ static void GLProgramsTest(skiatest::Reporter* reporter, GrContextFactory* facto for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { GrContext* context = factory->get(static_cast<GrContextFactory::GLContextType>(type)); if (NULL != context) { - GrGpuGL* shadersGpu = static_cast<GrGpuGL*>(context->getGpu()); - REPORTER_ASSERT(reporter, shadersGpu->programUnitTest()); + GrGpuGL* gpu = static_cast<GrGpuGL*>(context->getGpu()); + int maxStages = GrDrawState::kNumStages; +#if SK_ANGLE + // Some long shaders run out of temporary registers in the D3D compiler on ANGLE. + if (type == GrContextFactory::kANGLE_GLContextType) { + maxStages = 3; + } +#endif + REPORTER_ASSERT(reporter, gpu->programUnitTest(maxStages)); } } } |