aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGpuGL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl/GrGpuGL.cpp')
-rw-r--r--src/gpu/gl/GrGpuGL.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index a9b345bdba..9abd01c966 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -866,6 +866,8 @@ bool renderbuffer_storage_msaa(GrGLContextInfo& ctxInfo,
created = (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctxInfo.interface()));
}
if (!created) {
+ // glRBMS will fail if requested samples is > max samples.
+ sampleCount = GrMin(sampleCount, ctxInfo.caps().maxSampleCount());
GL_ALLOC_CALL(ctxInfo.interface(),
RenderbufferStorageMultisample(GR_GL_RENDERBUFFER,
sampleCount,