diff options
author | 2013-10-04 20:02:53 +0000 | |
---|---|---|
committer | 2013-10-04 20:02:53 +0000 | |
commit | 6b30e457409f37c91c301cd82040e733e2930286 (patch) | |
tree | 982cd0dc44b7ac63c8f99ffa21edc7a448a3278e /tests | |
parent | d35736d2d23d4d2d1efa5a49b4b5b93fff09aca0 (diff) |
Use vertexless shaders when NVpr is available
Adds support for vertexless shaders and enables them when
NV_path_rendering is available. This takes a
GrGLFragmentOnlyShaderBuilder class, a GrGLTexGenEffectArray class,
support for setting TexGen and the projection matrix in GrGpuGL, and
code for setting the GL fixed function state where necessary.
R=bsalomon@google.com, kkinnunen@nvidia.com
Author: cdalton@nvidia.com
Review URL: https://codereview.chromium.org/25846002
git-svn-id: http://skia.googlecode.com/svn/trunk@11620 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r-- | tests/GLProgramsTest.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index fe17f88945..13d0d2ee5b 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -78,6 +78,7 @@ void GrGLProgramDesc::setRandom(SkRandom* random, bool dstRead = false; bool fragPos = false; + bool vertexCode = false; int numStages = numColorStages + numCoverageStages; for (int s = 0; s < numStages; ++s) { const GrBackendEffectFactory& factory = (*stages[s]->getEffect())->getFactory(); @@ -89,6 +90,9 @@ void GrGLProgramDesc::setRandom(SkRandom* random, if ((*stages[s]->getEffect())->willReadFragmentPosition()) { fragPos = true; } + if ((*stages[s]->getEffect())->hasVertexCode()) { + vertexCode = true; + } } if (dstRead) { @@ -103,6 +107,11 @@ void GrGLProgramDesc::setRandom(SkRandom* random, header->fFragPosKey = 0; } + header->fHasVertexCode = vertexCode || + useLocalCoords || + kAttribute_ColorInput == header->fColorInput || + kAttribute_ColorInput == header->fCoverageInput; + CoverageOutput coverageOutput; bool illegalCoverageOutput; do { |