diff options
author | marha <marha@users.sourceforge.net> | 2011-07-01 14:21:21 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-07-01 14:21:21 +0200 |
commit | d9f970a847e1af706f07560ef163b229bb592307 (patch) | |
tree | 2fe2204f673487f3a8d7150f14cc456c6eb48d62 /mesalib/src/glsl/ast_to_hir.cpp | |
parent | 0feab87a4300a3e204e259d14a0a63e58e4a3c8f (diff) | |
download | vcxsrv-d9f970a847e1af706f07560ef163b229bb592307.tar.gz vcxsrv-d9f970a847e1af706f07560ef163b229bb592307.tar.bz2 vcxsrv-d9f970a847e1af706f07560ef163b229bb592307.zip |
xwininfo libX11 mesa mkfontscale xserver xkeyboard-config git update 1 Juli
2011
Diffstat (limited to 'mesalib/src/glsl/ast_to_hir.cpp')
-rw-r--r-- | mesalib/src/glsl/ast_to_hir.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/mesalib/src/glsl/ast_to_hir.cpp b/mesalib/src/glsl/ast_to_hir.cpp index 3b87f0d56..2e54e8c22 100644 --- a/mesalib/src/glsl/ast_to_hir.cpp +++ b/mesalib/src/glsl/ast_to_hir.cpp @@ -447,9 +447,17 @@ modulus_result_type(const struct glsl_type *type_a, * integer vectors. The operand types must both be signed or both be * unsigned." */ - if (!type_a->is_integer() || !type_b->is_integer() - || (type_a->base_type != type_b->base_type)) { - _mesa_glsl_error(loc, state, "type mismatch"); + if (!type_a->is_integer()) { + _mesa_glsl_error(loc, state, "LHS of operator %% must be an integer."); + return glsl_type::error_type; + } + if (!type_b->is_integer()) { + _mesa_glsl_error(loc, state, "RHS of operator %% must be an integer."); + return glsl_type::error_type; + } + if (type_a->base_type != type_b->base_type) { + _mesa_glsl_error(loc, state, + "operands of %% must have the same base type"); return glsl_type::error_type; } @@ -1940,7 +1948,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, break; case fragment_shader: - if (!global_scope || (var->mode != ir_var_in)) { + if (!global_scope || (var->mode != ir_var_out)) { fail = true; string = "output"; } |