diff options
author | Greg Daniel <egdaniel@google.com> | 2017-06-19 14:39:43 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-19 19:08:04 +0000 |
commit | d895ca673d08bd128fc809857eadca75a9b57ca0 (patch) | |
tree | cc9173685380bb4309e00540ec5d0168e1769a45 /tests/GLProgramsTest.cpp | |
parent | 6c12642904af16fcec03f574850b9cac300473e3 (diff) |
Limit number of stages for Angle D3D for GLPrograms test
Bug: skia:4717
Change-Id: I5ea613311d2c346bc45875040665a121b455f674
Reviewed-on: https://skia-review.googlesource.com/20228
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tests/GLProgramsTest.cpp')
-rw-r--r-- | tests/GLProgramsTest.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index cc61891dd4..66d6ceecec 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -342,7 +342,8 @@ bool GrDrawingManager::ProgramUnitTest(GrContext* context, int maxStages) { } #endif -static int get_glprograms_max_stages(GrContext* context) { +static int get_glprograms_max_stages(const sk_gpu_test::ContextInfo& ctxInfo) { + GrContext* context = ctxInfo.grContext(); GrGLGpu* gpu = static_cast<GrGLGpu*>(context->getGpu()); int maxStages = 6; if (kGLES_GrGLStandard == gpu->glStandard()) { @@ -359,11 +360,16 @@ static int get_glprograms_max_stages(GrContext* context) { maxStages = 3; #endif } + if (ctxInfo.type() == sk_gpu_test::GrContextFactory::kANGLE_D3D9_ES2_ContextType || + ctxInfo.type() == sk_gpu_test::GrContextFactory::kANGLE_D3D11_ES2_ContextType) { + // On Angle D3D we will hit a limit of out variables if we use too many stages. + maxStages = 3; + } return maxStages; } static void test_glprograms(skiatest::Reporter* reporter, const sk_gpu_test::ContextInfo& ctxInfo) { - int maxStages = get_glprograms_max_stages(ctxInfo.grContext()); + int maxStages = get_glprograms_max_stages(ctxInfo); if (maxStages == 0) { return; } |