From 8e919add406c5d20918a7f0ca811317312e6ce67 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Mon, 21 Oct 2013 14:48:23 +0000 Subject: Fix GrProgramsTest to not generate tests with too many TexCoord references Make GrProgramsTest check how many texture coordinate sets are available and select random effects up until the amount runs out. Otherwise, following effect sequence would fail the shader compilation when Skia is compiled with nv_path_rendering on (eg. when fixed function codepath is used): * Stage 0: TextureDomain (1 texcoord) * Stage 1: Convolution (1 texcoord) * Stage 2: Bitmap Alpha Threshold (2 texcoords) * Stage 3: DisplacementMap (2 texcoords) * Stage 4: Config Conversion (1 texcoords) * Stage 5: Two-Point Conical Gradient (2 texcoords) This would use more texture coordinate sets than 8, which is fairly common amount currently. R=bsalomon@google.com, cdalton@nvidia.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/32403002 git-svn-id: http://skia.googlecode.com/svn/trunk@11881 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/gl/GrGpuGL.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gpu/gl/GrGpuGL.h') diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h index 65e82077bc..5ff34aec22 100644 --- a/src/gpu/gl/GrGpuGL.h +++ b/src/gpu/gl/GrGpuGL.h @@ -50,6 +50,10 @@ public: void enableTexGen(int unitIdx, TexGenComponents, const GrGLfloat* coefficients); void enableTexGen(int unitIdx, TexGenComponents, const SkMatrix& matrix); void disableUnusedTexGen(int numUsedTexCoordSets); + bool shouldUseFixedFunctionTexturing() const { + return this->glCaps().fixedFunctionSupport() && + this->glCaps().pathRenderingSupport(); + } bool programUnitTest(int maxStages); -- cgit v1.2.3