diff options
author | Chris Dalton <csmartdalton@google.com> | 2017-10-06 11:57:51 -0600 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-06 18:43:06 +0000 |
commit | f1b47bb299e72456d70cf3eae8086a5e01766c67 (patch) | |
tree | 5c5181d2f88a5a80c53a0806d8d448b8073f2e75 /src/sksl/SkSLUtil.h | |
parent | 1fbb07a5c0e0b1c4dd3ca7172908d637e4098f4b (diff) |
Add a cap for geometry shader invocations
Bug: skia:7116
Change-Id: I3cc2ce7b2e5123c9adfd9781b2a5a8553747dfa5
Reviewed-on: https://skia-review.googlesource.com/56000
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/sksl/SkSLUtil.h')
-rw-r--r-- | src/sksl/SkSLUtil.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/sksl/SkSLUtil.h b/src/sksl/SkSLUtil.h index 808ec8a1d4..c4a6475034 100644 --- a/src/sksl/SkSLUtil.h +++ b/src/sksl/SkSLUtil.h @@ -180,6 +180,7 @@ public: sk_sp<GrShaderCaps> result = sk_make_sp<GrShaderCaps>(GrContextOptions()); result->fVersionDeclString = "#version 400"; result->fShaderDerivativeSupport = true; + result->fGSInvocationsSupport = true; return result; } @@ -248,10 +249,20 @@ public: return result; } - static sk_sp<GrShaderCaps> MustImplementGSInvocationsWithLoop() { + static sk_sp<GrShaderCaps> NoGSInvocationsSupport() { sk_sp<GrShaderCaps> result = sk_make_sp<GrShaderCaps>(GrContextOptions()); result->fVersionDeclString = "#version 400"; - result->fMustImplementGSInvocationsWithLoop = true; + result->fGeometryShaderSupport = true; + result->fGSInvocationsSupport = false; + return result; + } + + static sk_sp<GrShaderCaps> GSInvocationsExtensionString() { + sk_sp<GrShaderCaps> result = sk_make_sp<GrShaderCaps>(GrContextOptions()); + result->fVersionDeclString = "#version 400"; + result->fGeometryShaderSupport = true; + result->fGSInvocationsSupport = true; + result->fGSInvocationsExtensionString = "GL_ARB_gpu_shader5"; return result; } |