diff options
author | marha <marha@users.sourceforge.net> | 2013-10-31 08:40:01 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-10-31 08:40:01 +0100 |
commit | e4ef724e06621be9325fc41ed886fd404467fdc0 (patch) | |
tree | be445314647f682fbb4a1e8b94aeb6ee79cede5f /mesalib/src/glsl/glsl_parser_extras.h | |
parent | 270d3a1aa4137dc15d7b7e5a0958cc8c0bef9a1a (diff) | |
download | vcxsrv-e4ef724e06621be9325fc41ed886fd404467fdc0.tar.gz vcxsrv-e4ef724e06621be9325fc41ed886fd404467fdc0.tar.bz2 vcxsrv-e4ef724e06621be9325fc41ed886fd404467fdc0.zip |
fontconfig glproto libX11 mesa xserver xkeyboard-config git update 31 oct 2013
xserver commit 902ff0b3497d202b86bf9a411e17db7b694d6eaa
xkeyboard-config commit 70bbf18d6cddb7271db1b2e042765ace3c4ac485
libX11 commit 6cb02b166361200da35ba14f52cd9aaa493eb0ea
glproto commit aacc7a51b6161c765b04524e0d2ab31e5e586834
fontconfig commit 525a135ccf53e4bf3363c3143d9cfdf15fba55ab
mesa commit b16b3c8703f198ca0f025b730d582600df79c19c
Diffstat (limited to 'mesalib/src/glsl/glsl_parser_extras.h')
-rw-r--r-- | mesalib/src/glsl/glsl_parser_extras.h | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/mesalib/src/glsl/glsl_parser_extras.h b/mesalib/src/glsl/glsl_parser_extras.h index a67438412..f22dac355 100644 --- a/mesalib/src/glsl/glsl_parser_extras.h +++ b/mesalib/src/glsl/glsl_parser_extras.h @@ -69,6 +69,10 @@ typedef struct YYLTYPE { # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 +extern void _mesa_glsl_error(YYLTYPE *locp, _mesa_glsl_parse_state *state, + const char *fmt, ...); + + struct _mesa_glsl_parse_state { _mesa_glsl_parse_state(struct gl_context *_ctx, GLenum target, void *mem_ctx); @@ -121,6 +125,22 @@ struct _mesa_glsl_parse_state { return check_version(130, 300, locp, "bit-wise operations are forbidden"); } + bool check_explicit_attrib_location_allowed(YYLTYPE *locp, + const ir_variable *var) + { + if (!this->has_explicit_attrib_location()) { + const char *const requirement = this->es_shader + ? "GLSL ES 300" + : "GL_ARB_explicit_attrib_location extension or GLSL 330"; + + _mesa_glsl_error(locp, this, "%s explicit location requires %s", + mode_string(var), requirement); + return false; + } + + return true; + } + bool has_explicit_attrib_location() const { return ARB_explicit_attrib_location_enable || is_version(330, 300); @@ -229,6 +249,13 @@ struct _mesa_glsl_parse_state { unsigned MaxGeometryOutputVertices; unsigned MaxGeometryTotalOutputComponents; unsigned MaxGeometryUniformComponents; + + /* ARB_shader_atomic_counters */ + unsigned MaxVertexAtomicCounters; + unsigned MaxGeometryAtomicCounters; + unsigned MaxFragmentAtomicCounters; + unsigned MaxCombinedAtomicCounters; + unsigned MaxAtomicBufferBindings; } Const; /** @@ -325,6 +352,8 @@ struct _mesa_glsl_parse_state { bool ARB_shading_language_420pack_warn; bool EXT_shader_integer_mix_enable; bool EXT_shader_integer_mix_warn; + bool ARB_shader_atomic_counters_enable; + bool ARB_shader_atomic_counters_warn; /*@}*/ /** Extensions supported by the OpenGL implementation. */ @@ -363,9 +392,6 @@ do { \ (Current).source = 0; \ } while (0) -extern void _mesa_glsl_error(YYLTYPE *locp, _mesa_glsl_parse_state *state, - const char *fmt, ...); - /** * Emit a warning to the shader log * |