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: src/gpu/gl/GrGpuGL.cpp

Issue 32403002: Fix GrProgramsTest to not generate tests with too many TexCoord references (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: adress 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.h ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGpuGL.cpp
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 1fd6f7dd45e59c0600516473206216c011245174..108979dffccc4b876c204fb11c2f24ac4cc4a11e 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -2108,6 +2108,7 @@ void GrGpuGL::enableTexGen(int unitIdx,
SkASSERT(this->glCaps().fixedFunctionSupport());
SkASSERT(this->caps()->pathRenderingSupport());
SkASSERT(components >= kS_TexGenComponents && components <= kSTR_TexGenComponents);
+ SkASSERT(this->glCaps().maxFixedFunctionTextureCoords() >= unitIdx);
if (GR_GL_OBJECT_LINEAR == fHWTexGenSettings[unitIdx].fMode &&
components == fHWTexGenSettings[unitIdx].fNumComponents &&
@@ -2180,6 +2181,7 @@ void GrGpuGL::enableTexGen(int unitIdx, TexGenComponents components, const SkMat
void GrGpuGL::disableUnusedTexGen(int numUsedTexCoordSets) {
SkASSERT(this->glCaps().fixedFunctionSupport());
+ SkASSERT(this->glCaps().maxFixedFunctionTextureCoords() >= numUsedTexCoordSets);
for (int i = numUsedTexCoordSets; i < fHWActiveTexGenSets; i++) {
if (0 == fHWTexGenSettings[i].fNumComponents) {
« no previous file with comments | « src/gpu/gl/GrGpuGL.h ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698