aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/glsl_parser_extras.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-11-04 12:11:17 +0100
committermarha <marha@users.sourceforge.net>2013-11-04 12:11:17 +0100
commitd79b6645eb21ca82d506ef038b8ea71a1e431f3f (patch)
tree8f96f2c0492c134147a32e124ea5d0a7337b2242 /mesalib/src/glsl/glsl_parser_extras.h
parentfeb35c5e0724010fc4431e4e4fb24720fcdffe80 (diff)
parente4ef724e06621be9325fc41ed886fd404467fdc0 (diff)
downloadvcxsrv-d79b6645eb21ca82d506ef038b8ea71a1e431f3f.tar.gz
vcxsrv-d79b6645eb21ca82d506ef038b8ea71a1e431f3f.tar.bz2
vcxsrv-d79b6645eb21ca82d506ef038b8ea71a1e431f3f.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig glproto libX11 mesa xserver xkeyboard-config git update 31 oct 2013 Conflicts: xorg-server/glx/dispatch.h xorg-server/glx/glapi.c xorg-server/glx/glapi.h xorg-server/glx/glapi_gentable.c xorg-server/glx/glapitable.h xorg-server/glx/glprocs.h xorg-server/glx/glxcmdsswap.c xorg-server/glx/glxdri.c xorg-server/glx/glxext.c xorg-server/glx/glxext.h xorg-server/glx/indirect_dispatch.c xorg-server/glx/indirect_dispatch.h xorg-server/glx/indirect_dispatch_swap.c xorg-server/glx/indirect_reqsize.c xorg-server/glx/indirect_reqsize.h xorg-server/glx/indirect_size.h xorg-server/glx/indirect_size_get.c xorg-server/glx/indirect_size_get.h xorg-server/glx/indirect_table.c xorg-server/glx/indirect_texture_compression.c xorg-server/glx/render2.c xorg-server/glx/render2swap.c
Diffstat (limited to 'mesalib/src/glsl/glsl_parser_extras.h')
-rwxr-xr-xmesalib/src/glsl/glsl_parser_extras.h32
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 01000b445..32f26c7f0 100755
--- 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);
@@ -125,6 +129,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);
@@ -233,6 +253,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;
/**
@@ -329,6 +356,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. */
@@ -367,9 +396,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
*