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 |
438 // Some long shaders run out of temporary registers in the D3D compi
ler on ANGLE. | 439 // Some long shaders run out of temporary registers in the D3D compi
ler on ANGLE. |
439 if (type == GrContextFactory::kANGLE_GLContextType) { | 440 if (type == GrContextFactory::kANGLE_GLContextType) { |
440 maxStages = 2; | 441 maxStages = 2; |
441 } | 442 } |
442 #endif | 443 #endif |
| 444 #endif |
443 #if SK_COMMAND_BUFFER | 445 #if SK_COMMAND_BUFFER |
| 446 #ifdef SK_BUILD_FOR_WIN |
444 // Some long shaders run out of temporary registers in the D3D compi
ler on ANGLE. | 447 // Some long shaders run out of temporary registers in the D3D compi
ler on ANGLE. |
445 // TODO(hendrikw): This only needs to happen with the ANGLE comand b
uffer backend. | 448 // TODO(hendrikw): This only needs to happen with the ANGLE comand b
uffer backend. |
446 if (type == GrContextFactory::kCommandBuffer_GLContextType) { | 449 if (type == GrContextFactory::kCommandBuffer_GLContextType) { |
447 maxStages = 2; | 450 maxStages = 2; |
448 } | 451 } |
449 #endif | 452 #endif |
| 453 #endif |
450 REPORTER_ASSERT(reporter, GrDrawingManager::ProgramUnitTest(context,
maxStages)); | 454 REPORTER_ASSERT(reporter, GrDrawingManager::ProgramUnitTest(context,
maxStages)); |
451 } | 455 } |
452 } | 456 } |
453 } | 457 } |
454 | 458 |
455 #endif | 459 #endif |
OLD | NEW |