X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fsyntax.cpp;h=b224763248f26aa20f2d7e537ccbc6aa224acdb7;hb=a12f4941e78e1cc0070c5256180a18bb892adcb1;hp=d0273909d68db900e0d95e79c08f1d2cf9f140cd;hpb=8f5f54a9e165dae424e5b0bb8e488c3d01849bf6;p=libs%2Fgl.git diff --git a/source/glsl/syntax.cpp b/source/glsl/syntax.cpp index d0273909..b2247632 100644 --- a/source/glsl/syntax.cpp +++ b/source/glsl/syntax.cpp @@ -138,14 +138,16 @@ void InterfaceBlockReference::visit(NodeVisitor &visitor) MemberAccess::MemberAccess(): - declaration(0) + declaration(0), + index(-1) { } MemberAccess::MemberAccess(const MemberAccess &other): Expression(other), left(other.left), member(other.member), - declaration(0) + declaration(0), + index(-1) { } void MemberAccess::visit(NodeVisitor &visitor) @@ -553,6 +555,13 @@ int get_layout_value(const Layout &layout, const string &name, int def_value) return def_value; } +void add_to_chain(Assignment::Target &target, Assignment::Target::ChainType type, unsigned index) +{ + if(target.chain_len<7) + target.chain[target.chain_len] = type | min(index, 0x3F); + ++target.chain_len; +} + } // namespace SL } // namespace GL } // namespace Msp