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

Unified Diff: src/gpu/gl/GrGLCaps.h

Issue 1202293002: Move GLSL-specific routines/classes to separate glsl directory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rename GrGLGLSL.{cpp,h} Created 5 years, 6 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/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCaps.h
diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h
index 3d3319968fb87995899b734609a97047914d2291..fd03da5e466a2ba08ab52f1ec293012b8af21d6b 100644
--- a/src/gpu/gl/GrGLCaps.h
+++ b/src/gpu/gl/GrGLCaps.h
@@ -10,7 +10,7 @@
#define GrGLCaps_DEFINED
#include "GrCaps.h"
-#include "GrGLSL.h"
+#include "glsl/GrGLSL.h"
#include "GrGLStencilAttachment.h"
#include "SkChecksum.h"
#include "SkTHash.h"
@@ -328,6 +328,10 @@ private:
bool doReadPixelsSupported(const GrGLInterface* intf, GrGLenum format, GrGLenum type) const;
+ void initShaderPrecisionTable(const GrGLContextInfo& ctxInfo,
+ const GrGLInterface* intf,
+ GrGLSLCaps* glslCaps);
+
// tracks configs that have been verified to pass the FBO completeness when
// used as a color attachment
VerifiedColorConfigs fVerifiedColorConfigs;
@@ -387,88 +391,4 @@ private:
typedef GrCaps INHERITED;
};
-class GrGLSLCaps : public GrShaderCaps {
-public:
- SK_DECLARE_INST_COUNT(GrGLSLCaps)
-
- /**
- * Indicates how GLSL must interact with advanced blend equations. The KHR extension requires
- * special layout qualifiers in the fragment shader.
- */
- enum AdvBlendEqInteraction {
- kNotSupported_AdvBlendEqInteraction, //<! No _blend_equation_advanced extension
- kAutomatic_AdvBlendEqInteraction, //<! No interaction required
- kGeneralEnable_AdvBlendEqInteraction, //<! layout(blend_support_all_equations) out
- kSpecificEnables_AdvBlendEqInteraction, //<! Specific layout qualifiers per equation
-
- kLast_AdvBlendEqInteraction = kSpecificEnables_AdvBlendEqInteraction
- };
-
- /**
- * Initializes the GrGLSLCaps to the set of features supported in the current
- * OpenGL context accessible via ctxInfo.
- */
- GrGLSLCaps(const GrContextOptions&, const GrGLContextInfo&, const GrGLInterface*,
- const GrGLCaps&);
-
- /**
- * Some helper functions for encapsulating various extensions to read FB Buffer on openglES
- *
- * TODO(joshualitt) On desktop opengl 4.2+ we can achieve something similar to this effect
- */
- bool fbFetchSupport() const { return fFBFetchSupport; }
-
- bool fbFetchNeedsCustomOutput() const { return fFBFetchNeedsCustomOutput; }
-
- bool bindlessTextureSupport() const { return fBindlessTextureSupport; }
-
- const char* fbFetchColorName() const { return fFBFetchColorName; }
-
- const char* fbFetchExtensionString() const { return fFBFetchExtensionString; }
-
- bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; }
-
- AdvBlendEqInteraction advBlendEqInteraction() const { return fAdvBlendEqInteraction; }
-
- bool mustEnableAdvBlendEqs() const {
- return fAdvBlendEqInteraction >= kGeneralEnable_AdvBlendEqInteraction;
- }
-
- bool mustEnableSpecificAdvBlendEqs() const {
- return fAdvBlendEqInteraction == kSpecificEnables_AdvBlendEqInteraction;
- }
-
- bool mustDeclareFragmentShaderOutput() const {
- return fGLSLGeneration > k110_GrGLSLGeneration;
- }
-
- GrGLSLGeneration generation() const { return fGLSLGeneration; }
-
- /**
- * Returns a string containing the caps info.
- */
- SkString dump() const override;
-
-private:
- // Must be called after fGeometryShaderSupport is initialized.
- void initShaderPrecisionTable(const GrGLContextInfo&, const GrGLInterface*);
-
- GrGLSLGeneration fGLSLGeneration;
-
- bool fDropsTileOnZeroDivide : 1;
- bool fFBFetchSupport : 1;
- bool fFBFetchNeedsCustomOutput : 1;
- bool fBindlessTextureSupport : 1;
-
- const char* fFBFetchColorName;
- const char* fFBFetchExtensionString;
-
- AdvBlendEqInteraction fAdvBlendEqInteraction;
-
- friend class GrGLCaps; // For initialization.
-
- typedef GrShaderCaps INHERITED;
-};
-
-
#endif
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698