diff options
author | Oliver Wolff <oliver.wolff@theqtcompany.com> | 2016-03-24 12:38:18 +0100 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2016-04-25 05:57:38 +0000 |
commit | e12ba07322cd61c5cf50c25ed8d1f08f6b1ff879 (patch) | |
tree | d31a44c9f123ed764a00eff7b4fff656a07d54ab /src/3rdparty/angle/include/GLSLANG/ShaderLang.h | |
parent | d3dcc6f610b97be7cbfbb0a65988e5940568c825 (diff) |
Update ANGLE to chromium/2651
Change-Id: I1cd32b780b1a0b913fab870e155ae1f4f9ac40d7
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/3rdparty/angle/include/GLSLANG/ShaderLang.h')
-rw-r--r-- | src/3rdparty/angle/include/GLSLANG/ShaderLang.h | 80 |
1 files changed, 62 insertions, 18 deletions
diff --git a/src/3rdparty/angle/include/GLSLANG/ShaderLang.h b/src/3rdparty/angle/include/GLSLANG/ShaderLang.h index 126205af2c..d02723e760 100644 --- a/src/3rdparty/angle/include/GLSLANG/ShaderLang.h +++ b/src/3rdparty/angle/include/GLSLANG/ShaderLang.h @@ -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 134 +#define ANGLE_SH_VERSION 143 typedef enum { SH_GLES2_SPEC = 0x8B40, @@ -80,17 +80,35 @@ typedef enum { SH_CSS_SHADERS_SPEC = 0x8B42 } ShShaderSpec; -typedef enum { - 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 +typedef enum +{ + // ESSL output only supported in some configurations. + SH_ESSL_OUTPUT = 0x8B45, + + // GLSL output only supported in some configurations. + SH_GLSL_COMPATIBILITY_OUTPUT = 0x8B46, + // Note: GL introduced core profiles in 1.5. + SH_GLSL_130_OUTPUT = 0x8B47, + SH_GLSL_140_OUTPUT = 0x8B80, + SH_GLSL_150_CORE_OUTPUT = 0x8B81, + SH_GLSL_330_CORE_OUTPUT = 0x8B82, + SH_GLSL_400_CORE_OUTPUT = 0x8B83, + SH_GLSL_410_CORE_OUTPUT = 0x8B84, + SH_GLSL_420_CORE_OUTPUT = 0x8B85, + SH_GLSL_430_CORE_OUTPUT = 0x8B86, + SH_GLSL_440_CORE_OUTPUT = 0x8B87, + SH_GLSL_450_CORE_OUTPUT = 0x8B88, + + // HLSL output only supported in some configurations. + // Deprecated: + SH_HLSL_OUTPUT = 0x8B48, + SH_HLSL9_OUTPUT = 0x8B48, + SH_HLSL11_OUTPUT = 0x8B49, + + // Prefer using these to specify HLSL output type: + SH_HLSL_3_0_OUTPUT = 0x8B48, // D3D 9 + SH_HLSL_4_1_OUTPUT = 0x8B49, // D3D 11 + SH_HLSL_4_0_FL9_3_OUTPUT = 0x8B4A // D3D 11 feature level 9_3 } ShShaderOutput; // Compile options. @@ -112,7 +130,7 @@ typedef enum { // This is needed only as a workaround for certain OpenGL driver bugs. SH_EMULATE_BUILT_IN_FUNCTIONS = 0x0100, - // This is an experimental flag to enforce restrictions that aim to prevent + // This is an experimental flag to enforce restrictions that aim to prevent // timing attacks. // It generates compilation errors for shaders that could expose sensitive // texture information via the timing channel. @@ -177,6 +195,19 @@ typedef enum { // It is intended as a workaround for drivers that do not handle // struct scopes correctly, including all Mac drivers and Linux AMD. SH_REGENERATE_STRUCT_NAMES = 0x80000, + + // This flag makes the compiler not prune unused function early in the + // compilation process. Pruning coupled with SH_LIMIT_CALL_STACK_DEPTH + // helps avoid bad shaders causing stack overflows. + SH_DONT_PRUNE_UNUSED_FUNCTIONS = 0x100000, + + // This flag works around a bug in NVIDIA 331 series drivers related + // to pow(x, y) where y is a constant vector. + SH_REMOVE_POW_WITH_CONSTANT_EXPONENT = 0x200000, + + // This flag works around bugs in Mac drivers related to do-while by + // transforming them into an other construct. + SH_REWRITE_DO_WHILE_LOOPS = 0x400000, } ShCompileOptions; // Defines alternate strategies for implementing array index clamping. @@ -225,6 +256,7 @@ typedef struct int OES_standard_derivatives; int OES_EGL_image_external; int ARB_texture_rectangle; + int EXT_blend_func_extended; int EXT_draw_buffers; int EXT_frag_depth; int EXT_shader_texture_lod; @@ -239,7 +271,9 @@ typedef struct // function. This applies to Tegra K1 devices. int NV_draw_buffers; - // Set to 1 if highp precision is supported in the fragment language. + // Set to 1 if highp precision is supported in the ESSL 1.00 version of the + // fragment language. Does not affect versions of the language where highp + // support is mandatory. // Default is 0. int FragmentPrecisionHigh; @@ -249,6 +283,13 @@ typedef struct int MinProgramTexelOffset; int MaxProgramTexelOffset; + // Extension constants. + + // Value of GL_MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT for OpenGL ES output context. + // Value of GL_MAX_DUAL_SOURCE_DRAW_BUFFERS for OpenGL output context. + // GLES SL version 100 gl_MaxDualSourceDrawBuffersEXT value for EXT_blend_func_extended. + int MaxDualSourceDrawBuffers; + // Name Hashing. // Set a 64 bit hash function to enable user-defined name hashing. // Default is NULL. @@ -298,9 +339,9 @@ COMPILER_EXPORT const std::string &ShGetBuiltInResourcesString(const ShHandle ha // type: Specifies the type of shader - GL_FRAGMENT_SHADER or GL_VERTEX_SHADER. // 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. Note: HLSL output is only -// supported in some configurations. +// output: Specifies the output code type - for example SH_ESSL_OUTPUT, SH_GLSL_OUTPUT, +// SH_HLSL_3_0_OUTPUT or SH_HLSL_4_1_OUTPUT. Note: Each output type may only +// be supported in some configurations. // resources: Specifies the built-in resources. COMPILER_EXPORT ShHandle ShConstructCompiler( sh::GLenum type, @@ -339,6 +380,9 @@ COMPILER_EXPORT bool ShCompile( size_t numStrings, int compileOptions); +// Clears the results from the previous compilation. +COMPILER_EXPORT void ShClearResults(const ShHandle handle); + // Return the version of the shader language. COMPILER_EXPORT int ShGetShaderVersion(const ShHandle handle); @@ -373,7 +417,7 @@ COMPILER_EXPORT const std::map<std::string, std::string> *ShGetNameHashingMap( COMPILER_EXPORT const std::vector<sh::Uniform> *ShGetUniforms(const ShHandle handle); COMPILER_EXPORT const std::vector<sh::Varying> *ShGetVaryings(const ShHandle handle); COMPILER_EXPORT const std::vector<sh::Attribute> *ShGetAttributes(const ShHandle handle); -COMPILER_EXPORT const std::vector<sh::Attribute> *ShGetOutputVariables(const ShHandle handle); +COMPILER_EXPORT const std::vector<sh::OutputVariable> *ShGetOutputVariables(const ShHandle handle); COMPILER_EXPORT const std::vector<sh::InterfaceBlock> *ShGetInterfaceBlocks(const ShHandle handle); typedef struct |