[Mesa-dev] [PATCH 06/14] glsl: Clean up and clarify comment explaining initializer rules.
Ian Romanick
idr at freedesktop.org
Wed Jul 3 18:27:36 PDT 2013
Patches 1-6 (patch 4 w/Ken & Chad's suggestions) are:
Reviewed-by: Ian Romanick <ian.d.romainck at intel.com>
On 06/29/2013 07:43 PM, Matt Turner wrote:
> ---
> src/glsl/ast_function.cpp | 20 +++++++++++++-------
> 1 file changed, 13 insertions(+), 7 deletions(-)
>
> diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
> index 4b0b873..bbc607a 100644
> --- a/src/glsl/ast_function.cpp
> +++ b/src/glsl/ast_function.cpp
> @@ -1311,13 +1311,19 @@ ast_function_expression::hir(exec_list *instructions,
> }
>
>
> - /* There are two kinds of constructor call. Constructors for built-in
> - * language types, such as mat4 and vec2, are free form. The only
> - * requirement is that the parameters must provide enough values of the
> - * correct scalar type. Constructors for arrays and structures must
> - * have the exact number of parameters with matching types in the
> - * correct order. These constructors follow essentially the same type
> - * matching rules as functions.
> + /* There are two kinds of constructor calls. Constructors for arrays and
> + * structures must have the exact number of arguments with matching types
> + * in the correct order. These constructors follow essentially the same
> + * type matching rules as functions.
> + *
> + * Constructors for built-in language types, such as mat4 and vec2, are
> + * free form. The only requirements are that the parameters must provide
> + * enough values of the correct scalar type and that no arguments are
> + * given past the last used argument.
> + *
> + * When using the C-style initializer syntax from GLSL 4.20, constructors
> + * must have the exact number of arguments with matching types in the
> + * correct order.
> */
> if (constructor_type->is_record()) {
> exec_list actual_parameters;
>
More information about the mesa-dev
mailing list