On Wed, Jan 15, 2014 at 10:27 PM, Timothy Arceri <[email protected]> wrote:
> Signed-off-by: Timothy Arceri <[email protected]>
> ---
> src/glsl/glsl_types.cpp | 15 +++++++++++----
> src/glsl/glsl_types.h | 17 ++++++++++++++++-
> 2 files changed, 27 insertions(+), 5 deletions(-)
>
> diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp
> index 12d4ac0..1c9add7 100644
> --- a/src/glsl/glsl_types.cpp
> +++ b/src/glsl/glsl_types.cpp
> @@ -277,12 +277,13 @@ _mesa_glsl_release_types(void)
> }
>
>
> -glsl_type::glsl_type(const glsl_type *array, unsigned length) :
> +glsl_type::glsl_type(const glsl_type *array, unsigned length,
> + unsigned dimension_count) :
> base_type(GLSL_TYPE_ARRAY),
> sampler_dimensionality(0), sampler_shadow(0), sampler_array(0),
> sampler_type(0), interface_packing(0),
> vector_elements(0), matrix_columns(0),
> - name(NULL), length(length)
> + name(NULL), length(length), dimension_count(dimension_count)
> {
> this->fields.array = array;
> /* Inherit the gl type of the base. The GL type is used for
> @@ -416,10 +417,16 @@ glsl_type::get_instance(unsigned base_type, unsigned
> rows, unsigned columns)
> return error_type;
> }
>
> -
Unrelated whitespace change.
> const glsl_type *
> glsl_type::get_array_instance(const glsl_type *base, unsigned array_size)
> {
> + return get_array_instance(base, array_size, 1);
> +}
> +
> +const glsl_type *
> +glsl_type::get_array_instance(const glsl_type *base, unsigned array_size,
> + unsigned dimension_count)
> +{
Just add dimension_count=1 as a default parameter to the existing
get_array_instance() method.
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev