OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |