Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(761)

Unified Diff: src/gpu/glsl/GrGLSLCaps.h

Issue 1688233003: Add arb_texture_rectangle support properly in GLES3 shaders Base URL: https://skia.googlesource.com/skia.git@command-buffer-es3
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/glsl/GrGLSL.h ('k') | src/gpu/glsl/GrGLSLCaps.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/gpu/glsl/GrGLSL.h ('k') | src/gpu/glsl/GrGLSLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698