summaryrefslogtreecommitdiffstats
path: root/src/glsl/hir_field_selection.cpp
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2013-07-25 19:56:43 -0700
committerPaul Berry <stereotype441@gmail.com>2013-07-27 09:41:30 -0700
commit4d7899fe81b6ffc521c6f9688e25bcde4012e556 (patch)
treec230c0fce51c7b67a19223ca1f7601596cd76459 /src/glsl/hir_field_selection.cpp
parent8c3d3622d9ce2fd2a8f46084ab8153d708fa5b09 (diff)
downloadexternal_mesa3d-4d7899fe81b6ffc521c6f9688e25bcde4012e556.zip
external_mesa3d-4d7899fe81b6ffc521c6f9688e25bcde4012e556.tar.gz
external_mesa3d-4d7899fe81b6ffc521c6f9688e25bcde4012e556.tar.bz2
glsl: Be consistent about '\n', '.', and capitalization in errors/warnings.
The majority of calls to _mesa_glsl_error(), _mesa_glsl_warning(), and _mesa_glsl_parse_state::check_version() use a message that begins with a lower case letter and ends without a period. This patch makes all messages follow that convention. Also, error/warning messages shouldn't end in '\n', since _mesa_glsl_msg() automatically adds '\n' at the end of the message. Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/glsl/hir_field_selection.cpp')
-rw-r--r--src/glsl/hir_field_selection.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/glsl/hir_field_selection.cpp b/src/glsl/hir_field_selection.cpp
index ceb0a4c..08be743 100644
--- a/src/glsl/hir_field_selection.cpp
+++ b/src/glsl/hir_field_selection.cpp
@@ -53,13 +53,13 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr,
expr->primary_expression.identifier);
if (result->type->is_error()) {
- _mesa_glsl_error(& loc, state, "Cannot access field `%s' of "
+ _mesa_glsl_error(& loc, state, "cannot access field `%s' of "
"structure",
expr->primary_expression.identifier);
}
} else if (expr->subexpressions[1] != NULL) {
/* Handle "method calls" in GLSL 1.20 - namely, array.length() */
- state->check_version(120, 300, &loc, "Methods not supported");
+ state->check_version(120, 300, &loc, "methods not supported");
ast_expression *call = expr->subexpressions[1];
assert(call->oper == ast_function_call);
@@ -69,11 +69,11 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr,
if (strcmp(method, "length") == 0) {
if (!call->expressions.is_empty())
- _mesa_glsl_error(&loc, state, "length method takes no arguments.");
+ _mesa_glsl_error(&loc, state, "length method takes no arguments");
if (op->type->is_array()) {
if (op->type->array_size() == 0)
- _mesa_glsl_error(&loc, state, "length called on unsized array.");
+ _mesa_glsl_error(&loc, state, "length called on unsized array");
result = new(ctx) ir_constant(op->type->array_size());
} else if (op->type->is_vector()) {
@@ -82,7 +82,7 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr,
result = new(ctx) ir_constant((int) op->type->vector_elements);
} else {
_mesa_glsl_error(&loc, state, "length method on matrix only available"
- "with ARB_shading_language_420pack.");
+ "with ARB_shading_language_420pack");
}
} else if (op->type->is_matrix()) {
if (state->ARB_shading_language_420pack_enable) {
@@ -90,11 +90,11 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr,
result = new(ctx) ir_constant((int) op->type->matrix_columns);
} else {
_mesa_glsl_error(&loc, state, "length method on matrix only available"
- "with ARB_shading_language_420pack.");
+ "with ARB_shading_language_420pack");
}
}
} else {
- _mesa_glsl_error(&loc, state, "Unknown method: `%s'.", method);
+ _mesa_glsl_error(&loc, state, "unknown method: `%s'", method);
}
} else if (op->type->is_vector() ||
(state->ARB_shading_language_420pack_enable &&
@@ -109,12 +109,12 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr,
* FINISHME: ir_swizzle::create. This allows the generation of more
* FINISHME: specific error messages.
*/
- _mesa_glsl_error(& loc, state, "Invalid swizzle / mask `%s'",
+ _mesa_glsl_error(& loc, state, "invalid swizzle / mask `%s'",
expr->primary_expression.identifier);
}
} else {
- _mesa_glsl_error(& loc, state, "Cannot access field `%s' of "
- "non-structure / non-vector.",
+ _mesa_glsl_error(& loc, state, "cannot access field `%s' of "
+ "non-structure / non-vector",
expr->primary_expression.identifier);
}