diff options
author | 2011-01-19 13:15:36 +0000 | |
---|---|---|
committer | 2011-01-19 13:15:36 +0000 | |
commit | f44aa376f008b158289517df6c3aaefbe7610c8c (patch) | |
tree | ceca0156e4a6e2fbb92ee9053a4769bcb65752da | |
parent | 01804b44f9e4c468ef94aa3fe609a0a1b65fde3d (diff) |
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
-rw-r--r-- | gpu/src/GrGpuGLShaders.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gpu/src/GrGpuGLShaders.cpp b/gpu/src/GrGpuGLShaders.cpp index 03d46741c9..cacb8d464c 100644 --- a/gpu/src/GrGpuGLShaders.cpp +++ b/gpu/src/GrGpuGLShaders.cpp @@ -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], |