| Index: src/gpu/GrGpu.cpp
|
| diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
|
| index 2815f612d602707c2186d1348d8deca5ba45c426..b4572d55d80f9e255fc4c65271beb7e7e09c0800 100644
|
| --- a/src/gpu/GrGpu.cpp
|
| +++ b/src/gpu/GrGpu.cpp
|
| @@ -124,7 +124,11 @@ GrTexture* GrGpu::createTexture(const GrSurfaceDesc& origDesc, bool budgeted,
|
| GrGpuResource::LifeCycle lifeCycle = budgeted ? GrGpuResource::kCached_LifeCycle :
|
| GrGpuResource::kUncached_LifeCycle;
|
|
|
| - desc.fSampleCnt = SkTMin(desc.fSampleCnt, this->caps()->maxSampleCount());
|
| + // We require the sample count to be less than both the max color sample count and
|
| + // max stencil sample count supported by the system
|
| + int maxSampleCount = SkTMin(this->caps()->maxColorSampleCount(),
|
| + this->caps()->maxStencilSampleCount());
|
| + desc.fSampleCnt = SkTMin(desc.fSampleCnt, maxSampleCount);
|
| // Attempt to catch un- or wrongly initialized sample counts;
|
| SkASSERT(desc.fSampleCnt >= 0 && desc.fSampleCnt <= 64);
|
|
|
|
|