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

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 649783003: Force input coverage to be only a byte in gpu shaders. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 // This is a GPU-backend specific test. It relies on static intializers to work 9 // This is a GPU-backend specific test. It relies on static intializers to work
10 10
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 // local coords 182 // local coords
183 setup_random_ff_attribute(kLocalCoord_GrVertexAttribBinding, kVec2f_GrVertex AttribType, 183 setup_random_ff_attribute(kLocalCoord_GrVertexAttribBinding, kVec2f_GrVertex AttribType,
184 random, &attribIndex, &runningStride); 184 random, &attribIndex, &runningStride);
185 185
186 // color 186 // color
187 setup_random_ff_attribute(kColor_GrVertexAttribBinding, kVec4f_GrVertexAttri bType, 187 setup_random_ff_attribute(kColor_GrVertexAttribBinding, kVec4f_GrVertexAttri bType,
188 random, &attribIndex, &runningStride); 188 random, &attribIndex, &runningStride);
189 189
190 // coverage 190 // coverage
191 setup_random_ff_attribute(kCoverage_GrVertexAttribBinding, kVec4f_GrVertexAt tribType, 191 setup_random_ff_attribute(kCoverage_GrVertexAttribBinding, kUByte_GrVertexAt tribType,
192 random, &attribIndex, &runningStride); 192 random, &attribIndex, &runningStride);
193 193
194 // Update the geometry processor attributes 194 // Update the geometry processor attributes
195 const GrGeometryProcessor::VertexAttribArray& v = gp->getVertexAttribs(); 195 const GrGeometryProcessor::VertexAttribArray& v = gp->getVertexAttribs();
196 int numGPAttribs = v.count(); 196 int numGPAttribs = v.count();
197 SkASSERT(numGPAttribs <= GrGeometryProcessor::kMaxVertexAttribs && 197 SkASSERT(numGPAttribs <= GrGeometryProcessor::kMaxVertexAttribs &&
198 GrGeometryProcessor::kMaxVertexAttribs == 2); 198 GrGeometryProcessor::kMaxVertexAttribs == 2);
199 199
200 // we actually can't overflow if kMaxVertexAttribs == 2, but GCC 4.8 wants m ore proof 200 // we actually can't overflow if kMaxVertexAttribs == 2, but GCC 4.8 wants m ore proof
201 int maxIndex = SK_ARRAY_COUNT(kGenericVertexAttribs); 201 int maxIndex = SK_ARRAY_COUNT(kGenericVertexAttribs);
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 if (type == GrContextFactory::kANGLE_GLContextType) { 506 if (type == GrContextFactory::kANGLE_GLContextType) {
507 maxStages = 3; 507 maxStages = 3;
508 } 508 }
509 #endif 509 #endif
510 REPORTER_ASSERT(reporter, gpu->programUnitTest(maxStages)); 510 REPORTER_ASSERT(reporter, gpu->programUnitTest(maxStages));
511 } 511 }
512 } 512 }
513 } 513 }
514 514
515 #endif 515 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698