From a218a252c4200cfe7048de81a46f7e48349084d5 Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Wed, 8 Apr 2015 17:04:36 +0300 Subject: Upgrade ANGLE to 2.1~99f075dade7c This aligns with Chromium branch 2356. This version brings more complete OpenGL ES 3 support as well as various bug fixes and performance improvements. The following changes were made to earlier patches: -0000-General-fixes-for-ANGLE-2.1 Removed. All changes are now handled elsewhere. +0001-ANGLE-Improve-Windows-Phone-support Consolidated remaining parts from 0009/0010. +0002-ANGLE-Fix-compilation-with-MinGW Remaining issues from patch 0016. +0003-ANGLE-Fix-compilation-with-MSVC2010 Remaining issues from patch 0015. +0004-ANGLE-Dynamically-load-D3D-compiler-from-list Renamed from patch 0008. +0005-ANGLE-Add-support-for-querying-platform-device Renamed from patch 0013. -0004-Make-it-possible-to-link-ANGLE-statically-for-single Removed. Fixed by adding defines to project files. -0008-ANGLE-Dynamically-load-D3D-compiler-from-a-list-or-t Renamed to patch 0005. -0009-ANGLE-Support-WinRT Removed. Mostly fixed upstream; remaining parts in patch 0001. -0010-ANGLE-Enable-D3D11-for-feature-level-9-cards Removed. Mostly fixed upstream; remaining parts in patch 0001. -0012-ANGLE-fix-semantic-index-lookup Removed. Fixed upstream. -0013-ANGLE-Add-support-for-querying-platform-device Renamed to patch 0005. -0014-Let-ANGLE-use-multithreaded-devices-if-necessary Removed. No longer needed. -0015-ANGLE-Fix-angle-d3d11-on-MSVC2010 Moved remaining parts to patch 0003. -0016-ANGLE-Fix-compilation-with-MinGW-D3D11 Moved remaining parts to patch 0002. -0017-ANGLE-Fix-compilation-with-D3D9 Removed. Fixed upstream. -0018-ANGLE-Fix-releasing-textures-after-we-kill-D3D11 Removed. Fixed upstream. -0019-ANGLE-Fix-handling-of-shader-source-with-fixed-lengt Removed. Fixed upstream. -0020-ANGLE-Do-not-use-std-strlen Removed. Fixed upstream. -0020-ANGLE-Fix-compilation-with-MSVC2013-Update4 Removed. Fixed upstream. [ChangeLog][Third-party libraries] ANGLE was updated to Chromium branch 2356 (2.1~99f075dade7c). Change-Id: I32ccbfe95e10986bd94be7191dfd53445ea09158 Task-number: QTBUG-44815 Task-number: QTBUG-37660 Task-number: QTBUG-44694 Task-number: QTBUG-42443 Reviewed-by: Andrew Knight Reviewed-by: Friedemann Kleint --- src/3rdparty/angle/include/EGL/egl.h | 9 +- src/3rdparty/angle/include/EGL/eglext.h | 24 ++--- src/3rdparty/angle/include/EGL/eglplatform.h | 17 ++-- src/3rdparty/angle/include/GLSLANG/ShaderLang.h | 30 ++++--- src/3rdparty/angle/include/GLSLANG/ShaderVars.h | 9 +- src/3rdparty/angle/include/KHR/khrplatform.h | 2 +- src/3rdparty/angle/include/angle_gl.h | 6 +- src/3rdparty/angle/include/export.h | 28 ++++++ src/3rdparty/angle/include/platform/Platform.h | 112 ++++++++++++++++++++++++ 9 files changed, 203 insertions(+), 34 deletions(-) mode change 100644 => 100755 src/3rdparty/angle/include/KHR/khrplatform.h create mode 100644 src/3rdparty/angle/include/export.h create mode 100644 src/3rdparty/angle/include/platform/Platform.h (limited to 'src/3rdparty/angle/include') diff --git a/src/3rdparty/angle/include/EGL/egl.h b/src/3rdparty/angle/include/EGL/egl.h index 12590a0e20..5a27291213 100644 --- a/src/3rdparty/angle/include/EGL/egl.h +++ b/src/3rdparty/angle/include/EGL/egl.h @@ -33,12 +33,12 @@ extern "C" { ** used to make the header, and the header can be found at ** http://www.opengl.org/registry/ ** -** Khronos $Revision: 27018 $ on $Date: 2014-06-10 08:06:12 -0700 (Tue, 10 Jun 2014) $ +** Khronos $Revision: 29318 $ on $Date: 2015-01-02 03:16:10 -0800 (Fri, 02 Jan 2015) $ */ #include -/* Generated on date 20140610 */ +/* Generated on date 20150102 */ /* Generated C header for: * API: egl @@ -240,6 +240,7 @@ EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void); typedef void *EGLSync; typedef intptr_t EGLAttrib; typedef khronos_utime_nanoseconds_t EGLTime; +typedef void *EGLImage; #define EGL_CONTEXT_MAJOR_VERSION 0x3098 #define EGL_CONTEXT_MINOR_VERSION 0x30FB #define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD @@ -281,10 +282,14 @@ typedef khronos_utime_nanoseconds_t EGLTime; #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6 #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7 #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8 +#define EGL_IMAGE_PRESERVED 0x30D2 +#define EGL_NO_IMAGE ((EGLImage)0) EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list); EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync); EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout); EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value); +EGLAPI EGLImage EGLAPIENTRY eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage (EGLDisplay dpy, EGLImage image); EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *native_display, const EGLAttrib *attrib_list); EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list); EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list); diff --git a/src/3rdparty/angle/include/EGL/eglext.h b/src/3rdparty/angle/include/EGL/eglext.h index 0cc5eec293..a44afecb3f 100644 --- a/src/3rdparty/angle/include/EGL/eglext.h +++ b/src/3rdparty/angle/include/EGL/eglext.h @@ -440,24 +440,28 @@ EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSu #ifndef EGL_ANGLE_platform_angle #define EGL_ANGLE_platform_angle 1 -#define EGL_PLATFORM_ANGLE_ANGLE 0x3201 -#define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3202 -#define EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE 0x3203 -#define EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE 0x3204 -#define EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE 0x3205 +#define EGL_PLATFORM_ANGLE_ANGLE 0x3202 +#define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3203 +#define EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE 0x3204 +#define EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE 0x3205 +#define EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE 0x3206 #endif /* EGL_ANGLE_platform_angle */ #ifndef EGL_ANGLE_platform_angle_d3d #define EGL_ANGLE_platform_angle_d3d 1 -#define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3206 -#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3207 -#define EGL_PLATFORM_ANGLE_USE_WARP_ANGLE 0x3208 +#define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3207 +#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208 +#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE 0x3209 +#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE 0x320A +#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE 0x320B +#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE 0x320C +#define EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE 0x320F #endif /* EGL_ANGLE_platform_angle_d3d */ #ifndef EGL_ANGLE_platform_angle_opengl #define EGL_ANGLE_platform_angle_opengl 1 -#define EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE 0x3209 -#define EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE 0x320A +#define EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE 0x320D +#define EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE 0x320E #endif /* EGL_ANGLE_platform_angle_opengl */ #ifndef EGL_ARM_pixmap_multisample_discard diff --git a/src/3rdparty/angle/include/EGL/eglplatform.h b/src/3rdparty/angle/include/EGL/eglplatform.h index 2eb3674a0b..519df3e750 100644 --- a/src/3rdparty/angle/include/EGL/eglplatform.h +++ b/src/3rdparty/angle/include/EGL/eglplatform.h @@ -73,15 +73,14 @@ #endif #include +typedef HDC EGLNativeDisplayType; typedef HBITMAP EGLNativePixmapType; -#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PC_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) /* Windows Store */ +#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) /* Windows Desktop */ +typedef HWND EGLNativeWindowType; +#else /* Windows Store */ #include -typedef IInspectable* EGLNativeDisplayType; typedef IInspectable* EGLNativeWindowType; -#else -typedef HDC EGLNativeDisplayType; -typedef HWND EGLNativeWindowType; #endif #elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ @@ -110,6 +109,14 @@ typedef Display *EGLNativeDisplayType; typedef Pixmap EGLNativePixmapType; typedef Window EGLNativeWindowType; +#elif defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__) ) + +// TODO(jmadill): native implementation for OSX + +typedef void *EGLNativeDisplayType; +typedef void *EGLNativePixmapType; +typedef void *EGLNativeWindowType; + #else #error "Platform not recognized" #endif diff --git a/src/3rdparty/angle/include/GLSLANG/ShaderLang.h b/src/3rdparty/angle/include/GLSLANG/ShaderLang.h index 647fed6a02..126205af2c 100644 --- a/src/3rdparty/angle/include/GLSLANG/ShaderLang.h +++ b/src/3rdparty/angle/include/GLSLANG/ShaderLang.h @@ -3,8 +3,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -#ifndef _COMPILER_INTERFACE_INCLUDED_ -#define _COMPILER_INTERFACE_INCLUDED_ +#ifndef GLSLANG_SHADERLANG_H_ +#define GLSLANG_SHADERLANG_H_ #if defined(COMPONENT_BUILD) && !defined(ANGLE_TRANSLATOR_STATIC) #if defined(_WIN32) || defined(_WIN64) @@ -48,7 +48,7 @@ typedef unsigned int GLenum; // Version number for shader translation API. // It is incremented every time the API changes. -#define ANGLE_SH_VERSION 132 +#define ANGLE_SH_VERSION 134 typedef enum { SH_GLES2_SPEC = 0x8B40, @@ -81,11 +81,16 @@ typedef enum { } ShShaderSpec; typedef enum { - SH_ESSL_OUTPUT = 0x8B45, - SH_GLSL_OUTPUT = 0x8B46, - SH_HLSL_OUTPUT = 0x8B47, - SH_HLSL9_OUTPUT = 0x8B47, - SH_HLSL11_OUTPUT = 0x8B48 + SH_ESSL_OUTPUT = 0x8B45, + // SH_GLSL_OUTPUT is deprecated. This is to not break the build. + SH_GLSL_OUTPUT = 0x8B46, + SH_GLSL_COMPATIBILITY_OUTPUT = 0x8B46, + SH_GLSL_CORE_OUTPUT = 0x8B47, + + // HLSL output only supported in some configurations. + SH_HLSL_OUTPUT = 0x8B48, + SH_HLSL9_OUTPUT = 0x8B48, + SH_HLSL11_OUTPUT = 0x8B49 } ShShaderOutput; // Compile options. @@ -223,6 +228,10 @@ typedef struct int EXT_draw_buffers; int EXT_frag_depth; int EXT_shader_texture_lod; + int WEBGL_debug_shader_precision; + int EXT_shader_framebuffer_fetch; + int NV_shader_framebuffer_fetch; + int ARM_shader_framebuffer_fetch; // Set to 1 to enable replacing GL_EXT_draw_buffers #extension directives // with GL_NV_draw_buffers in ESSL output. This flag can be used to emulate @@ -290,7 +299,8 @@ COMPILER_EXPORT const std::string &ShGetBuiltInResourcesString(const ShHandle ha // spec: Specifies the language spec the compiler must conform to - // SH_GLES2_SPEC or SH_WEBGL_SPEC. // output: Specifies the output code type - SH_ESSL_OUTPUT, SH_GLSL_OUTPUT, -// SH_HLSL9_OUTPUT or SH_HLSL11_OUTPUT. +// SH_HLSL9_OUTPUT or SH_HLSL11_OUTPUT. Note: HLSL output is only +// supported in some configurations. // resources: Specifies the built-in resources. COMPILER_EXPORT ShHandle ShConstructCompiler( sh::GLenum type, @@ -408,4 +418,4 @@ COMPILER_EXPORT bool ShGetUniformRegister(const ShHandle handle, const std::string &uniformName, unsigned int *indexOut); -#endif // _COMPILER_INTERFACE_INCLUDED_ +#endif // GLSLANG_SHADERLANG_H_ diff --git a/src/3rdparty/angle/include/GLSLANG/ShaderVars.h b/src/3rdparty/angle/include/GLSLANG/ShaderVars.h index da21c3e76e..4128c343f8 100644 --- a/src/3rdparty/angle/include/GLSLANG/ShaderVars.h +++ b/src/3rdparty/angle/include/GLSLANG/ShaderVars.h @@ -7,8 +7,8 @@ // Types to represent GL variables (varyings, uniforms, etc) // -#ifndef _COMPILER_INTERFACE_VARIABLES_ -#define _COMPILER_INTERFACE_VARIABLES_ +#ifndef GLSLANG_SHADERVARS_H_ +#define GLSLANG_SHADERVARS_H_ #include #include @@ -28,6 +28,9 @@ enum InterpolationType INTERPOLATION_FLAT }; +// Validate link & SSO consistency of interpolation qualifiers +COMPILER_EXPORT bool InterpolationTypesMatch(InterpolationType a, InterpolationType b); + // Uniform block layout qualifier, see section 4.3.8.3 of the ESSL 3.00.4 spec enum BlockLayoutType { @@ -182,4 +185,4 @@ struct COMPILER_EXPORT InterfaceBlock } -#endif // _COMPILER_INTERFACE_VARIABLES_ +#endif // GLSLANG_SHADERVARS_H_ diff --git a/src/3rdparty/angle/include/KHR/khrplatform.h b/src/3rdparty/angle/include/KHR/khrplatform.h old mode 100644 new mode 100755 index 1ac2d3f324..c9e6f17d34 --- a/src/3rdparty/angle/include/KHR/khrplatform.h +++ b/src/3rdparty/angle/include/KHR/khrplatform.h @@ -97,7 +97,7 @@ *------------------------------------------------------------------------- * This precedes the return type of the function in the function prototype. */ -#if defined(_WIN32) && !defined(__SCITECH_SNAP__) && !defined(QT_OPENGL_ES_2_ANGLE_STATIC) +#if defined(_WIN32) && !defined(__SCITECH_SNAP__) # define KHRONOS_APICALL __declspec(dllimport) #elif defined (__SYMBIAN32__) # define KHRONOS_APICALL IMPORT_C diff --git a/src/3rdparty/angle/include/angle_gl.h b/src/3rdparty/angle/include/angle_gl.h index d093f75ee2..e7ecdbd2f0 100644 --- a/src/3rdparty/angle/include/angle_gl.h +++ b/src/3rdparty/angle/include/angle_gl.h @@ -7,8 +7,8 @@ // Includes all necessary GL headers and definitions for ANGLE. // -#ifndef ANGLE_GL_H_ -#define ANGLE_GL_H_ +#ifndef ANGLEGL_H_ +#define ANGLEGL_H_ #include "GLES2/gl2.h" #include "GLES2/gl2ext.h" @@ -20,4 +20,4 @@ #define GL_SAMPLER_2D_RECT_ARB 0x8B63 #endif -#endif // ANGLE_GL_H_ +#endif // ANGLEGL_H_ diff --git a/src/3rdparty/angle/include/export.h b/src/3rdparty/angle/include/export.h new file mode 100644 index 0000000000..cdf6245d6d --- /dev/null +++ b/src/3rdparty/angle/include/export.h @@ -0,0 +1,28 @@ +// +// Copyright(c) 2014 The ANGLE Project Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +// export.h : Defines ANGLE_EXPORT, a macro for exporting functions from the DLL + +#ifndef LIBGLESV2_EXPORT_H_ +#define LIBGLESV2_EXPORT_H_ + +#if defined(_WIN32) +# if defined(LIBGLESV2_IMPLEMENTATION) || defined(LIBANGLE_IMPLEMENTATION) +# define ANGLE_EXPORT __declspec(dllexport) +# else +# define ANGLE_EXPORT __declspec(dllimport) +# endif +#elif defined(__GNUC__) +# if defined(LIBGLESV2_IMPLEMENTATION) || defined(LIBANGLE_IMPLEMENTATION) +# define ANGLE_EXPORT __attribute__((visibility ("default"))) +# else +# define ANGLE_EXPORT +# endif +#else +# define ANGLE_EXPORT +#endif + +#endif // LIBGLESV2_EXPORT_H_ diff --git a/src/3rdparty/angle/include/platform/Platform.h b/src/3rdparty/angle/include/platform/Platform.h new file mode 100644 index 0000000000..d915d5c0fd --- /dev/null +++ b/src/3rdparty/angle/include/platform/Platform.h @@ -0,0 +1,112 @@ +// +// Copyright (c) 2015 The ANGLE Project Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Platform.h: The public interface ANGLE exposes to the API layer, for +// doing platform-specific tasks like gathering data, or for tracing. + +#ifndef ANGLE_PLATFORM_H +#define ANGLE_PLATFORM_H + +#include + +#include "../export.h" + +namespace angle +{ + +class Platform +{ + public: + + // Tracing -------- + + typedef uint64_t TraceEventHandle; + + // Add a trace event to the platform tracing system. Depending on the actual + // enabled state, this event may be recorded or dropped. + // - phase specifies the type of event: + // - BEGIN ('B'): Marks the beginning of a scoped event. + // - END ('E'): Marks the end of a scoped event. + // - COMPLETE ('X'): Marks the beginning of a scoped event, but doesn't + // need a matching END event. Instead, at the end of the scope, + // updateTraceEventDuration() must be called with the TraceEventHandle + // returned from addTraceEvent(). + // - INSTANT ('I'): Standalone, instantaneous event. + // - START ('S'): Marks the beginning of an asynchronous event (the end + // event can occur in a different scope or thread). The id parameter is + // used to match START/FINISH pairs. + // - FINISH ('F'): Marks the end of an asynchronous event. + // - COUNTER ('C'): Used to trace integer quantities that change over + // time. The argument values are expected to be of type int. + // - METADATA ('M'): Reserved for internal use. + // - categoryEnabled is the pointer returned by getTraceCategoryEnabledFlag. + // - name is the name of the event. Also used to match BEGIN/END and + // START/FINISH pairs. + // - id optionally allows events of the same name to be distinguished from + // each other. For example, to trace the consutruction and destruction of + // objects, specify the pointer as the id parameter. + // - numArgs specifies the number of elements in argNames, argTypes, and + // argValues. + // - argNames is the array of argument names. Use long-lived literal strings + // or specify the COPY flag. + // - argTypes is the array of argument types: + // - BOOL (1): bool + // - UINT (2): unsigned long long + // - INT (3): long long + // - DOUBLE (4): double + // - POINTER (5): void* + // - STRING (6): char* (long-lived null-terminated char* string) + // - COPY_STRING (7): char* (temporary null-terminated char* string) + // - CONVERTABLE (8): WebConvertableToTraceFormat + // - argValues is the array of argument values. Each value is the unsigned + // long long member of a union of all supported types. + // - flags can be 0 or one or more of the following, ORed together: + // - COPY (0x1): treat all strings (name, argNames and argValues of type + // string) as temporary so that they will be copied by addTraceEvent. + // - HAS_ID (0x2): use the id argument to uniquely identify the event for + // matching with other events of the same name. + // - MANGLE_ID (0x4): specify this flag if the id parameter is the value + // of a pointer. + virtual TraceEventHandle addTraceEvent(char phase, + const unsigned char *categoryEnabledFlag, + const char *name, + unsigned long long id, + double timestamp, + int numArgs, + const char **argNames, + const unsigned char *argTypes, + const unsigned long long *argValues, + unsigned char flags) + { + return 0; + } + + // Set the duration field of a COMPLETE trace event. + virtual void updateTraceEventDuration(const unsigned char* categoryEnabledFlag, const char* name, TraceEventHandle) { } + + // Callbacks for reporting histogram data. + // CustomCounts histogram has exponential bucket sizes, so that min=1, max=1000000, bucketCount=50 would do. + virtual void histogramCustomCounts(const char* name, int sample, int min, int max, int bucketCount) { } + // Enumeration histogram buckets are linear, boundaryValue should be larger than any possible sample value. + virtual void histogramEnumeration(const char* name, int sample, int boundaryValue) { } + // Unlike enumeration histograms, sparse histograms only allocate memory for non-empty buckets. + virtual void histogramSparse(const char* name, int sample) { } + + protected: + virtual ~Platform() { } +}; + +} + +typedef void(*ANGLEPlatformInitializeFunc)(angle::Platform*); +ANGLE_EXPORT void ANGLEPlatformInitialize(angle::Platform*); + +typedef void (*ANGLEPlatformShutdownFunc)(); +ANGLE_EXPORT void ANGLEPlatformShutdown(); + +typedef angle::Platform *(*ANGLEPlatformCurrentFunc)(); +ANGLE_EXPORT angle::Platform *ANGLEPlatformCurrent(); + +#endif // ANGLE_PLATFORM_H -- cgit v1.2.3