Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: tests/GLProgramsTest.cpp

Issue 25846002: Use vertexless shaders when NVpr is available (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix mac build Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGpuGL_program.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GLProgramsTest.cpp
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index fe17f889457922309e1fa4d01b1804537931f9de..13d0d2ee5be91f8e45fc077a24ef476c46e87cd3 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 {
« no previous file with comments | « src/gpu/gl/GrGpuGL_program.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698