[Piglit] [PATCH] varying-packing: use correct type for extra varyings
Ilia Mirkin
imirkin at alum.mit.edu
Wed Nov 4 22:17:27 PST 2015
This might be a little mesa-specific... meh.
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
On Wed, Nov 4, 2015 at 11:58 PM, Timothy Arceri <t_arceri at yahoo.com.au> wrote:
> From: Timothy Arceri <timothy.arceri at collabora.com>
>
> In order to make sure we use the all the room available in our
> packing tests with vec3s we add some extra varyings to fill the
> the remaining space. However they need to be the same type in order
> to be packed together.
>
> This fixes some failing tests.
> ---
> tests/spec/glsl-1.10/execution/varying-packing/simple.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/tests/spec/glsl-1.10/execution/varying-packing/simple.c b/tests/spec/glsl-1.10/execution/varying-packing/simple.c
> index 2b1c010..f555569 100644
> --- a/tests/spec/glsl-1.10/execution/varying-packing/simple.c
> +++ b/tests/spec/glsl-1.10/execution/varying-packing/simple.c
> @@ -407,7 +407,20 @@ choose_varyings(struct varying_desc *varyings,
> }
> }
> for (i = 0; i < num_extra_varyings; ++i) {
> - varyings[num_varyings].type = &float_type;
> + switch(test_type->base) {
> + case BASE_TYPE_UINT:
> + varyings[num_varyings].type = &uint_type;
> + break;
> + case BASE_TYPE_INT:
> + varyings[num_varyings].type = &int_type;
> + break;
> + case BASE_TYPE_FLOAT:
> + varyings[num_varyings].type = &float_type;
> + break;
> + case BASE_TYPE_DOUBLE:
> + varyings[num_varyings].type = &double_type;
> + break;
> + }
> varyings[num_varyings].two_dim_array_elems = 0;
> varyings[num_varyings].one_dim_array_elems = 0;
> ++num_varyings;
> --
> 2.4.3
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
More information about the Piglit
mailing list