diff options
author | Zack Rusin <[email protected]> | 2010-06-28 17:31:21 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2010-06-28 22:53:21 -0400 |
commit | da7bd6a90e1fee5c16327338fd251c0f6be34e36 (patch) | |
tree | 5f7e3d8f6d30799033afd78beec3e643ef4c7d6c /src/glsl/cl/sl_cl_parse.c | |
parent | 0b50fcbd556ead8d35c2b543f13de433996a5822 (diff) |
mesa: initial support for ARB_geometry_shader4
laying down the foundation for everything and implementing most of the
stuff.
linking, gl_VerticesIn and multidimensional inputs are left.
Diffstat (limited to 'src/glsl/cl/sl_cl_parse.c')
-rw-r--r-- | src/glsl/cl/sl_cl_parse.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/src/glsl/cl/sl_cl_parse.c b/src/glsl/cl/sl_cl_parse.c index 663436dde99..65df6c38ae7 100644 --- a/src/glsl/cl/sl_cl_parse.c +++ b/src/glsl/cl/sl_cl_parse.c @@ -246,6 +246,7 @@ #define PARAM_QUALIFIER_IN 0 #define PARAM_QUALIFIER_OUT 1 #define PARAM_QUALIFIER_INOUT 2 +#define PARAM_QUALIFIER_NONE 3 /* function parameter */ #define PARAMETER_NONE 0 @@ -836,7 +837,6 @@ _parse_storage_qualifier(struct parse_context *ctx, return 0; } - static int _parse_struct_declarator(struct parse_context *ctx, struct parse_state *ps) @@ -1114,6 +1114,21 @@ _parse_type_specifier(struct parse_context *ctx, return 0; } +static int +_parse_parameter_qualifier(struct parse_context *ctx, + struct parse_state *ps) +{ + unsigned int e = _emit(ctx, &ps->out, PARAM_QUALIFIER_NONE); + + if (_parse_id(ctx, ctx->dict.in, ps) == 0) { + _update(ctx, e, PARAM_QUALIFIER_IN); + } else if (_parse_id(ctx, ctx->dict.out, ps) == 0) { + _update(ctx, e, PARAM_QUALIFIER_OUT); + } else if (_parse_id(ctx, ctx->dict.inout, ps) == 0) { + _update(ctx, e, PARAM_QUALIFIER_INOUT); + } + return 0; +} static int _parse_fully_specified_type(struct parse_context *ctx, @@ -1136,6 +1151,7 @@ _parse_fully_specified_type(struct parse_context *ctx, if (_parse_storage_qualifier(ctx, &p)) { _emit(ctx, &p.out, TYPE_QUALIFIER_NONE); } + _parse_parameter_qualifier(ctx, &p); if (_parse_precision(ctx, &p)) { _emit(ctx, &p.out, PRECISION_DEFAULT); } @@ -1168,23 +1184,6 @@ _parse_function_header(struct parse_context *ctx, static int -_parse_parameter_qualifier(struct parse_context *ctx, - struct parse_state *ps) -{ - unsigned int e = _emit(ctx, &ps->out, PARAM_QUALIFIER_IN); - - if (_parse_id(ctx, ctx->dict.out, ps) == 0) { - _update(ctx, e, PARAM_QUALIFIER_OUT); - } else if (_parse_id(ctx, ctx->dict.inout, ps) == 0) { - _update(ctx, e, PARAM_QUALIFIER_INOUT); - } else { - _parse_id(ctx, ctx->dict.in, ps); - } - return 0; -} - - -static int _parse_function_identifier(struct parse_context *ctx, struct parse_state *ps) { |