glsl: Forbid calling the constructor of any opaque type.
The spec doesn't define any opaque type constructors. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
c4111dfa0a
commit
e6146e6f14
|
@ -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()) {
|
if (constructor_type->contains_opaque()) {
|
||||||
_mesa_glsl_error(& loc, state, "cannot construct sampler type `%s'",
|
_mesa_glsl_error(& loc, state, "cannot construct opaque type `%s'",
|
||||||
constructor_type->name);
|
constructor_type->name);
|
||||||
return ir_rvalue::error_value(ctx);
|
return ir_rvalue::error_value(ctx);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue