| Index: src/gpu/glsl/GrGLSLCaps.h
|
| diff --git a/src/gpu/glsl/GrGLSLCaps.h b/src/gpu/glsl/GrGLSLCaps.h
|
| index 7b0868ea929900e4b0cc392e7bd7dac3672466ab..a1d458a5470d7a37239850cc6209554cfdf179ed 100755
|
| --- a/src/gpu/glsl/GrGLSLCaps.h
|
| +++ b/src/gpu/glsl/GrGLSLCaps.h
|
| @@ -162,6 +162,11 @@ public:
|
| return fConfigOutputSwizzle[config];
|
| }
|
|
|
| + /** Precision qualifier that should be used with a sampler, given its config and visibility. */
|
| + GrSLPrecision samplerPrecision(GrPixelConfig config, GrShaderFlags visibility) const {
|
| + return static_cast<GrSLPrecision>(fSamplerPrecisions[visibility][config]);
|
| + }
|
| +
|
| GrGLSLGeneration generation() const { return fGLSLGeneration; }
|
|
|
| /**
|
| @@ -170,6 +175,9 @@ public:
|
| SkString dump() const override;
|
|
|
| private:
|
| + /** GrCaps subclasses must call this after filling in the shader precision table. */
|
| + void initSamplerPrecisionTable();
|
| +
|
| void onApplyOptionsOverrides(const GrContextOptions& options) override;
|
|
|
| GrGLSLGeneration fGLSLGeneration;
|
| @@ -216,6 +224,8 @@ private:
|
| GrSwizzle fConfigTextureSwizzle[kGrPixelConfigCnt];
|
| GrSwizzle fConfigOutputSwizzle[kGrPixelConfigCnt];
|
|
|
| + uint8_t fSamplerPrecisions[(1 << kGrShaderTypeCount)][kGrPixelConfigCnt];
|
| +
|
| friend class GrGLCaps; // For initialization.
|
| friend class GrVkCaps;
|
|
|
|
|