gfx/angle/src/compiler/ExtensionBehavior.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/angle/src/compiler/ExtensionBehavior.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,37 @@
     1.4 +//
     1.5 +// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
     1.6 +// Use of this source code is governed by a BSD-style license that can be
     1.7 +// found in the LICENSE file.
     1.8 +//
     1.9 +
    1.10 +#ifndef _EXTENSION_BEHAVIOR_INCLUDED_
    1.11 +#define _EXTENSION_BEHAVIOR_INCLUDED_
    1.12 +
    1.13 +#include <map>
    1.14 +#include <string>
    1.15 +
    1.16 +typedef enum
    1.17 +{
    1.18 +    EBhRequire,
    1.19 +    EBhEnable,
    1.20 +    EBhWarn,
    1.21 +    EBhDisable,
    1.22 +    EBhUndefined
    1.23 +} TBehavior;
    1.24 +
    1.25 +inline const char* getBehaviorString(TBehavior b)
    1.26 +{
    1.27 +    switch(b)
    1.28 +    {
    1.29 +      case EBhRequire: return "require";
    1.30 +      case EBhEnable: return "enable";
    1.31 +      case EBhWarn: return "warn";
    1.32 +      case EBhDisable: return "disable";
    1.33 +      default: return NULL;
    1.34 +    }
    1.35 +}
    1.36 +
    1.37 +// Mapping between extension name and behavior.
    1.38 +typedef std::map<std::string, TBehavior> TExtensionBehavior;
    1.39 +
    1.40 +#endif // _EXTENSION_TABLE_INCLUDED_

mercurial