OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 // This is a GPU-backend specific test. It relies on static intializers to work | 9 // This is a GPU-backend specific test. It relies on static intializers to work |
10 | 10 |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 if (kGL_GrGLStandard == gpu->glStandard() || | 428 if (kGL_GrGLStandard == gpu->glStandard() || |
429 kARM_GrGLVendor == gpu->ctxInfo().vendor()) { | 429 kARM_GrGLVendor == gpu->ctxInfo().vendor()) { |
430 maxStages = 6; | 430 maxStages = 6; |
431 } else if (kTegra3_GrGLRenderer == gpu->ctxInfo().renderer() || | 431 } else if (kTegra3_GrGLRenderer == gpu->ctxInfo().renderer() || |
432 kOther_GrGLRenderer == gpu->ctxInfo().renderer()) { | 432 kOther_GrGLRenderer == gpu->ctxInfo().renderer()) { |
433 maxStages = 1; | 433 maxStages = 1; |
434 } else { | 434 } else { |
435 return; | 435 return; |
436 } | 436 } |
437 #if SK_ANGLE | 437 #if SK_ANGLE |
438 #ifdef SK_BUILD_FOR_WIN | |
439 // Some long shaders run out of temporary registers in the D3D compi
ler on ANGLE. | 438 // Some long shaders run out of temporary registers in the D3D compi
ler on ANGLE. |
440 if (type == GrContextFactory::kANGLE_GLContextType) { | 439 if (type == GrContextFactory::kANGLE_GLContextType) { |
441 maxStages = 2; | 440 maxStages = 2; |
442 } | 441 } |
443 #endif | 442 #endif |
444 #endif | |
445 #if SK_COMMAND_BUFFER | 443 #if SK_COMMAND_BUFFER |
446 #ifdef SK_BUILD_FOR_WIN | |
447 // Some long shaders run out of temporary registers in the D3D compi
ler on ANGLE. | 444 // Some long shaders run out of temporary registers in the D3D compi
ler on ANGLE. |
448 // TODO(hendrikw): This only needs to happen with the ANGLE comand b
uffer backend. | 445 // TODO(hendrikw): This only needs to happen with the ANGLE comand b
uffer backend. |
449 if (type == GrContextFactory::kCommandBuffer_GLContextType) { | 446 if (type == GrContextFactory::kCommandBuffer_GLContextType) { |
450 maxStages = 2; | 447 maxStages = 2; |
451 } | 448 } |
452 #endif | 449 #endif |
453 #endif | |
454 REPORTER_ASSERT(reporter, GrDrawingManager::ProgramUnitTest(context,
maxStages)); | 450 REPORTER_ASSERT(reporter, GrDrawingManager::ProgramUnitTest(context,
maxStages)); |
455 } | 451 } |
456 } | 452 } |
457 } | 453 } |
458 | 454 |
459 #endif | 455 #endif |
OLD | NEW |