summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2014-12-04 10:40:56 +0200
committerFrancisco Jerez <[email protected]>2015-02-10 15:49:43 +0200
commite6146e6f14d5e2f9080ce033814fb1d14a175e70 (patch)
tree1911941b1b49357d3aa6648a3b86c6082d8e9d13
parentc4111dfa0a54238510a0c6374d6eb421c296d64f (diff)
glsl: Forbid calling the constructor of any opaque type.
The spec doesn't define any opaque type constructors. Reviewed-by: Ian Romanick <[email protected]>
-rw-r--r--src/glsl/ast_function.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
index cbff9d8b452..151b0825ea9 100644
--- a/src/glsl/ast_function.cpp
+++ b/src/glsl/ast_function.cpp
@@ -1524,10 +1524,10 @@ ast_function_expression::hir(exec_list *instructions,
}
- /* Constructors for samplers are illegal.
+ /* Constructors for opaque types are illegal.
*/
- if (constructor_type->is_sampler()) {
- _mesa_glsl_error(& loc, state, "cannot construct sampler type `%s'",
+ if (constructor_type->contains_opaque()) {
+ _mesa_glsl_error(& loc, state, "cannot construct opaque type `%s'",
constructor_type->name);
return ir_rvalue::error_value(ctx);
}