| Index: src/gpu/glsl/GrGLSLFragmentShaderBuilder.h
|
| diff --git a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h
|
| index b9816af71a2a014ea8eb1388443078993c8fa4a5..05185eb0359c7b81defee4d3b38d3807c2499aae 100644
|
| --- a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h
|
| +++ b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "GrGLSLShaderBuilder.h"
|
|
|
| +#include "GrProcessor.h"
|
| #include "glsl/GrGLSLProcessorTypes.h"
|
|
|
| class GrRenderTarget;
|
| @@ -171,14 +172,16 @@ private:
|
| const char* getPrimaryColorOutputName() const;
|
| const char* getSecondaryColorOutputName() const;
|
|
|
| +#ifdef SK_DEBUG
|
| // As GLSLProcessors emit code, there are some conditions we need to verify. We use the below
|
| // state to track this. The reset call is called per processor emitted.
|
| + bool usedBuiltInState() const { return fUsedBuiltInState; }
|
| bool hasReadDstColor() const { return fHasReadDstColor; }
|
| - bool hasReadFragmentPosition() const { return fHasReadFragmentPosition; }
|
| - void reset() {
|
| + void resetVerification() {
|
| + fUsedBuiltInState = GrProcessor::kNone_BuiltInState;
|
| fHasReadDstColor = false;
|
| - fHasReadFragmentPosition = false;
|
| }
|
| +#endif
|
|
|
| static const char* DeclaredColorOutputName() { return "fsColorOut"; }
|
| static const char* DeclaredSecondaryColorOutputName() { return "fsSecondaryColorOut"; }
|
| @@ -226,10 +229,12 @@ private:
|
| bool fHasSecondaryOutput;
|
| bool fHasInitializedSampleMask;
|
|
|
| +#ifdef SK_DEBUG
|
| // some state to verify shaders and effects are consistent, this is reset between effects by
|
| // the program creator
|
| + GrProcessor::BuiltInState fUsedBuiltInState;
|
| bool fHasReadDstColor;
|
| - bool fHasReadFragmentPosition;
|
| +#endif
|
|
|
| friend class GrGLSLProgramBuilder;
|
| friend class GrGLProgramBuilder;
|
|
|