summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/include/GLSLANG/ShaderLang.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/include/GLSLANG/ShaderLang.h')
-rw-r--r--src/3rdparty/angle/include/GLSLANG/ShaderLang.h43
1 files changed, 24 insertions, 19 deletions
diff --git a/src/3rdparty/angle/include/GLSLANG/ShaderLang.h b/src/3rdparty/angle/include/GLSLANG/ShaderLang.h
index 4b69fb1fb0..b7989f5f7e 100644
--- a/src/3rdparty/angle/include/GLSLANG/ShaderLang.h
+++ b/src/3rdparty/angle/include/GLSLANG/ShaderLang.h
@@ -23,9 +23,10 @@
#define COMPILER_EXPORT
#endif
-#include "KHR/khrplatform.h"
#include <stddef.h>
+#include "KHR/khrplatform.h"
+
//
// This is the platform independent interface between an OGL driver
// and the shading language compiler.
@@ -37,13 +38,17 @@ namespace sh
typedef unsigned int GLenum;
}
+// Must be included after GLenum proxy typedef
+// Note: make sure to increment ANGLE_SH_VERSION when changing ShaderVars.h
+#include "ShaderVars.h"
+
#ifdef __cplusplus
extern "C" {
#endif
// Version number for shader translation API.
// It is incremented every time the API changes.
-#define ANGLE_SH_VERSION 128
+#define ANGLE_SH_VERSION 130
typedef enum {
SH_GLES2_SPEC = 0x8B40,
@@ -100,14 +105,9 @@ typedef enum {
SH_NAME_MAX_LENGTH = 0x6001,
SH_HASHED_NAME_MAX_LENGTH = 0x6002,
SH_HASHED_NAMES_COUNT = 0x6003,
- SH_ACTIVE_UNIFORMS_ARRAY = 0x6004,
- SH_SHADER_VERSION = 0x6005,
- SH_ACTIVE_INTERFACE_BLOCKS_ARRAY = 0x6006,
- SH_ACTIVE_OUTPUT_VARIABLES_ARRAY = 0x6007,
- SH_ACTIVE_ATTRIBUTES_ARRAY = 0x6008,
- SH_ACTIVE_VARYINGS_ARRAY = 0x6009,
- SH_RESOURCES_STRING_LENGTH = 0x600A,
- SH_OUTPUT_TYPE = 0x600B
+ SH_SHADER_VERSION = 0x6004,
+ SH_RESOURCES_STRING_LENGTH = 0x6005,
+ SH_OUTPUT_TYPE = 0x6006
} ShShaderInfo;
// Compile options.
@@ -189,6 +189,11 @@ typedef enum {
// This flag scalarizes vec/ivec/bvec/mat constructor args.
// It is intended as a workaround for Linux/Mac driver bugs.
SH_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS = 0x40000,
+
+ // This flag overwrites a struct name with a unique prefix.
+ // 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,
} ShCompileOptions;
// Defines alternate strategies for implementing array index clamping.
@@ -453,17 +458,17 @@ COMPILER_EXPORT void ShGetNameHashingEntry(const ShHandle handle,
char* name,
char* hashedName);
-// Returns a parameter from a compiled shader.
+// Shader variable inspection.
+// Returns a pointer to a list of variables of the designated type.
+// (See ShaderVars.h for type definitions, included above)
+// Returns NULL on failure.
// Parameters:
// handle: Specifies the compiler
-// pname: Specifies the parameter to query.
-// The following parameters are defined:
-// SH_ACTIVE_UNIFORMS_ARRAY: an STL vector of active uniforms. Valid only for
-// HLSL output.
-// params: Requested parameter
-COMPILER_EXPORT void ShGetInfoPointer(const ShHandle handle,
- ShShaderInfo pname,
- void** params);
+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::InterfaceBlock> *ShGetInterfaceBlocks(const ShHandle handle);
typedef struct
{