| Index: src/gpu/glsl/GrGLSLCaps.h
|
| diff --git a/src/gpu/glsl/GrGLSLCaps.h b/src/gpu/glsl/GrGLSLCaps.h
|
| index 060539645e23369d3e5e6aae2079b0f9702aa71e..dcbf9ad9a16a91863a75b3d94e79de2e589b4994 100755
|
| --- a/src/gpu/glsl/GrGLSLCaps.h
|
| +++ b/src/gpu/glsl/GrGLSLCaps.h
|
| @@ -10,13 +10,39 @@
|
| #define GrGLSLCaps_DEFINED
|
|
|
| #include "GrCaps.h"
|
| -#include "GrGLSL.h"
|
| #include "GrSwizzle.h"
|
|
|
| +// Limited set of GLSL versions we build shaders for. Caller should round
|
| +// down the GLSL version to one of these enums.
|
| +enum GrGLSLGeneration {
|
| + /**
|
| + * Desktop GLSL 1.10 and ES2 shading language (based on desktop GLSL 1.20)
|
| + */
|
| + k110_GrGLSLGeneration,
|
| + /**
|
| + * Desktop GLSL 1.30
|
| + */
|
| + k130_GrGLSLGeneration,
|
| + /**
|
| + * Desktop GLSL 1.40
|
| + */
|
| + k140_GrGLSLGeneration,
|
| + /**
|
| + * Desktop GLSL 1.50
|
| + */
|
| + k150_GrGLSLGeneration,
|
| + /**
|
| + * Desktop GLSL 3.30, and ES GLSL 3.00
|
| + */
|
| + k330_GrGLSLGeneration,
|
| + /**
|
| + * ES GLSL 3.10 only TODO Make GLSLCap objects to make this more granular
|
| + */
|
| + k310es_GrGLSLGeneration,
|
| +};
|
| +
|
| class GrGLSLCaps : public GrShaderCaps {
|
| public:
|
| -
|
| -
|
| /**
|
| * Indicates how GLSL must interact with advanced blend equations. The KHR extension requires
|
| * special layout qualifiers in the fragment shader.
|
| @@ -105,6 +131,12 @@ public:
|
| return fExternalTextureExtensionString;
|
| }
|
|
|
| + const char* rectangleTextureExtensionString() const {
|
| + return fRectangleTextureExtensionString;
|
| + }
|
| + bool rectangleTextureUseUnifiedTextureFunctionName() const {
|
| + return fRectangleTextureUseUnifiedTextureFunctionName;
|
| + }
|
| /**
|
| * Given a texture's config, this determines what swizzle must be appended to accesses to the
|
| * texture in generated shader code. Swizzling may be implemented in texture parameters or a
|
| @@ -142,12 +174,15 @@ private:
|
| bool fCanUseMinAndAbsTogether : 1;
|
| bool fMustForceNegatedAtanParamToFloat : 1;
|
|
|
| + bool fRectangleTextureUseUnifiedTextureFunctionName : 1;
|
| +
|
| const char* fVersionDeclString;
|
|
|
| const char* fShaderDerivativeExtensionString;
|
| const char* fFragCoordConventionsExtensionString;
|
| const char* fSecondaryOutputExtensionString;
|
| const char* fExternalTextureExtensionString;
|
| + const char* fRectangleTextureExtensionString;
|
|
|
| const char* fFBFetchColorName;
|
| const char* fFBFetchExtensionString;
|
|
|