[Mesa-dev] [PATCH V2 1/3] glsl: move array validation into its own function
Matt Turner
mattst88 at gmail.com
Fri Feb 27 11:59:46 PST 2015
On Wed, Feb 25, 2015 at 11:45 PM, Timothy Arceri <t_arceri at yahoo.com.au> wrote:
> V2: return true when var->type is unsized by max access is within valid range
>
> ---
> src/glsl/linker.cpp | 89 ++++++++++++++++++++++++++++++-----------------------
> src/glsl/linker.h | 5 +++
> 2 files changed, 55 insertions(+), 39 deletions(-)
>
> diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
> index 3f5eac1..dafcbe0 100644
> --- a/src/glsl/linker.cpp
> +++ b/src/glsl/linker.cpp
> @@ -680,6 +680,45 @@ validate_geometry_shader_emissions(struct gl_context *ctx,
> }
> }
>
> +bool
> +validate_intrastage_arrays(struct gl_shader_program *prog,
> + ir_variable *const var,
> + ir_variable *const existing)
> +{
> + /* Consider the types to be "the same" if both types are arrays
> + * of the same type and one of the arrays is implicitly sized.
> + * In addition, set the type of the linked variable to the
> + * explicitly sized array.
> + */
> + if (var->type->is_array() && existing->type->is_array() &&
> + (var->type->fields.array == existing->type->fields.array) &&
> + ((var->type->length == 0)|| (existing->type->length == 0))) {
Space between ) and ||.
Jordan, this series is touching interface block stuff. Could you review it?
More information about the mesa-dev
mailing list