Use min of max_texture and max_renderbuffer size when calling fbo_test
git-svn-id: http://skia.googlecode.com/svn/trunk@1110 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
9f2f0a84d5
commit
7aaee005fa
@ -407,6 +407,8 @@ GrGpuGL::GrGpuGL() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GR_GL_GetIntegerv(GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureDimension);
|
||||||
|
|
||||||
/* The iPhone 4 has a restriction that for an FBO with texture color
|
/* The iPhone 4 has a restriction that for an FBO with texture color
|
||||||
attachment with height <= 8 then the width must be <= height. Here
|
attachment with height <= 8 then the width must be <= height. Here
|
||||||
we look for such a limitation.
|
we look for such a limitation.
|
||||||
@ -414,6 +416,8 @@ GrGpuGL::GrGpuGL() {
|
|||||||
fMinRenderTargetHeight = GR_INVAL_GLINT;
|
fMinRenderTargetHeight = GR_INVAL_GLINT;
|
||||||
GrGLint maxRenderSize;
|
GrGLint maxRenderSize;
|
||||||
GR_GL_GetIntegerv(GR_GL_MAX_RENDERBUFFER_SIZE, &maxRenderSize);
|
GR_GL_GetIntegerv(GR_GL_MAX_RENDERBUFFER_SIZE, &maxRenderSize);
|
||||||
|
// fbo_test creates FBOs with texture bound to the color attachment
|
||||||
|
maxRenderSize = GrMin(maxRenderSize, fMaxTextureDimension);
|
||||||
|
|
||||||
if (gPrintStartupSpew) {
|
if (gPrintStartupSpew) {
|
||||||
GrPrintf("Small height FBO texture experiments\n");
|
GrPrintf("Small height FBO texture experiments\n");
|
||||||
@ -456,8 +460,6 @@ GrGpuGL::GrGpuGL() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
GrAssert(GR_INVAL_GLINT != fMinRenderTargetWidth);
|
GrAssert(GR_INVAL_GLINT != fMinRenderTargetWidth);
|
||||||
|
|
||||||
GR_GL_GetIntegerv(GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureDimension);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GrGpuGL::~GrGpuGL() {
|
GrGpuGL::~GrGpuGL() {
|
||||||
|
Loading…
Reference in New Issue
Block a user