add compile flag GR_SKIP_2POINTRADIAL_PROGRAMS to ignore the 2point-radial

shader programs (for now), which have problematic on some GPUs



git-svn-id: http://skia.googlecode.com/svn/trunk@710 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2011-01-19 13:15:36 +00:00
parent 01804b44f9
commit f44aa376f0

View File

@ -446,7 +446,7 @@ bool GrGpuGLShaders::createProgram(GLuint vshader, GLuint fshader,
} else if (-1 != samplerLocation && !hasTexture) {
GrAssert(!"unexpectedly found texture sampler");
}
#if !ATTRIBUTE_MATRIX
#if !ATTRIBUTE_MATRIX && !defined(GR_SKIP_2POINTRADIAL_PROGRAMS)
if (-1 == program->fTexMatrixLocation && hasTexMatrix) {
GrAssert(!"Expected to find texture matrix");
GR_GL(DeleteProgram(program->fProgramID));
@ -502,6 +502,9 @@ GrGpuGLShaders::GrGpuGLShaders() {
GR_STATIC_ASSERT(kProgramCount == GR_ARRAY_COUNT(gProgramLoadData));
for (int p = 0; p < kProgramCount; ++p) {
#ifdef GR_SKIP_2POINTRADIAL_PROGRAMS
if (11 == p || 12 == p) continue;
#endif
GR_DEBUGCODE(bool result = )
createProgram(vshadIDs[gProgramLoadData[p].fVShaderIdx],
fshadIDs[gProgramLoadData[p].fFShaderIdx],