diff options
author | 2016-07-04 15:55:17 -0700 | |
---|---|---|
committer | 2016-07-04 15:55:17 -0700 | |
commit | 09d49a3bfe2d1e652a648ce1ea0962b38d10d166 (patch) | |
tree | cc7ab96fee76e22b6180bcfb9b8073dd80d020f6 /src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp | |
parent | 2b2810b4eb423cc6a368b5f8b011a3508fef7a63 (diff) |
Fix caching of sample locations
The original caching logic for sample locations wishfully assumed that
the GPU would always use the same sample pattern for render targets
that had the same number of samples. It turns out we can't rely on
that. This change improves the caching logic to handle mismatched
simple patterns with the same count, and adds a unit test that
emulates different sample patterns observed on real hardware.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2111423002
Review-Url: https://codereview.chromium.org/2111423002
Diffstat (limited to 'src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp')
-rw-r--r-- | src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp index a52b1a6386..5d1ba511b7 100644 --- a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp +++ b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp @@ -365,7 +365,7 @@ void GrGLSLFragmentShaderBuilder::defineSampleOffsetArray(const char* name, cons const GrGpu::MultisampleSpecs& specs = rtp.getMultisampleSpecs(pipeline.getStencil()); SkSTArray<16, SkPoint, true> offsets; offsets.push_back_n(specs.fEffectiveSampleCnt); - m.mapPoints(offsets.begin(), specs.fSampleLocations.get(), specs.fEffectiveSampleCnt); + m.mapPoints(offsets.begin(), specs.fSampleLocations, specs.fEffectiveSampleCnt); this->definitions().append("const "); if (fProgramBuilder->glslCaps()->usesPrecisionModifiers()) { this->definitions().append("highp "); |