From 3605ace7ddaf0b576bf6df1c7a550ab4f44d22a8 Mon Sep 17 00:00:00 2001 From: Ethan Nicholas Date: Mon, 21 Nov 2016 15:59:48 -0500 Subject: sksl programs can now directly query GLSL caps This adds support for querying "sk_Caps." 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 Reviewed-by: Ben Wagner --- src/sksl/ir/SkSLModifiers.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/sksl/ir/SkSLModifiers.h') 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) {} -- cgit v1.2.3