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

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

Issue 1431433003: Move shader compiling to ProgramBuilder and various ShaderBuilder cleanups. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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
Index: src/gpu/glsl/GrGLSLCaps.h
diff --git a/src/gpu/glsl/GrGLSLCaps.h b/src/gpu/glsl/GrGLSLCaps.h
index 4d6f5806674621e7174b6f80ae2c46c1b50e3637..3a80b3e2d81590865625c1736b295d2b51d9cfe5 100755
--- a/src/gpu/glsl/GrGLSLCaps.h
+++ b/src/gpu/glsl/GrGLSLCaps.h
@@ -74,6 +74,18 @@ public:
bool forceHighPrecisionNDSTransform() const { return fForceHighPrecisionNDSTransform; }
+ bool textureSwizzleSupport() const { return fTextureSwizzleSupport; }
bsalomon 2015/10/30 17:10:53 These two seem like features of the API and not of
+
+ bool textureRedSupport() const { return fTextureRedSupport; }
+
+ // Returns the string of an extension that must be enabled in the shader to support
+ // derivatives. If nullptr is returned then no extension needs to be enabled. Before calling
+ // this function, the caller should check that shaderDerivativeSupport exists.
+ const char* shaderDerivativeExtensionString() const {
+ SkASSERT(this->shaderDerivativeSupport());
+ return fShaderDerivativeExtensionString;
+ }
+
GrGLSLGeneration generation() const { return fGLSLGeneration; }
/**
@@ -91,9 +103,13 @@ private:
bool fUsesPrecisionModifiers : 1;
bool fCanUseAnyFunctionInShader : 1;
bool fForceHighPrecisionNDSTransform : 1;
+ bool fTextureSwizzleSupport : 1;
+ bool fTextureRedSupport : 1;
const char* fVersionDeclString;
+ const char* fShaderDerivativeExtensionString;
+
const char* fFBFetchColorName;
const char* fFBFetchExtensionString;

Powered by Google App Engine
This is Rietveld 408576698