DEF_GPUTEST(GLPrograms, reporter, factory) { for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { GrContext* context = factory->get(static_cast<GrContextFactory::GLContextType>(type)); if (context) { GrGpuGL* gpu = static_cast<GrGpuGL*>(context->getGpu()); int maxStages = 6; #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)); } } }
static void GLProgramsTest(skiatest::Reporter* reporter, GrContext* context) { GrGpuGL* shadersGpu = static_cast<GrGpuGL*>(context->getGpu()); REPORTER_ASSERT(reporter, shadersGpu->programUnitTest()); }