diff options
author | 2016-11-21 15:59:48 -0500 | |
---|---|---|
committer | 2016-11-22 14:20:27 +0000 | |
commit | 3605ace7ddaf0b576bf6df1c7a550ab4f44d22a8 (patch) | |
tree | 929ee78317ba05e8f2c36c0f1b4bafea87794ca0 /src/sksl/ir/SkSLModifiers.h | |
parent | 9bcca6a2124b60ce9fab18ba697b28fc6a1354db (diff) |
sksl programs can now directly query GLSL caps
This adds support for querying "sk_Caps.<cap>" directly from within an SkSL program.
Combined with the existing support for collapsing 'if' statements with constant tests,
this means we can query caps using ordinary 'if' statements and the tests will
collapse out at compile time.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4795
Change-Id: I24d716a7fe6abf1489760bf08189164264269076
Reviewed-on: https://skia-review.googlesource.com/4795
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Diffstat (limited to 'src/sksl/ir/SkSLModifiers.h')
-rw-r--r-- | src/sksl/ir/SkSLModifiers.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sksl/ir/SkSLModifiers.h b/src/sksl/ir/SkSLModifiers.h index 2c9b3b39c9..fb26677c52 100644 --- a/src/sksl/ir/SkSLModifiers.h +++ b/src/sksl/ir/SkSLModifiers.h @@ -30,6 +30,10 @@ struct Modifiers { kNoPerspective_Flag = ASTModifiers::kNoPerspective_Flag }; + Modifiers() + : fLayout(Layout()) + , fFlags(0) {} + Modifiers(const ASTModifiers& modifiers) : fLayout(modifiers.fLayout) , fFlags(modifiers.fFlags) {} |