[Piglit] [PATCH 1/4] arb_texture_cube_map_array: sample-cube-map-array-shadow use glDrawArrays instead of piglit_draw_rect

Eric Anholt eric at anholt.net
Fri Jun 21 14:13:06 PDT 2013


Fabian Bieler <fabianbieler at fastmail.fm> writes:

> Don't mix piglit_draw_rect and additional attribute arrays.
> ---
>  .../sampler-cube-array-shadow.c                    | 94 +++++++++++-----------
>  1 file changed, 47 insertions(+), 47 deletions(-)
>
> diff --git a/tests/spec/arb_texture_cube_map_array/sampler-cube-array-shadow.c b/tests/spec/arb_texture_cube_map_array/sampler-cube-array-shadow.c
> index f22e984..f7525b1 100644
> --- a/tests/spec/arb_texture_cube_map_array/sampler-cube-array-shadow.c
> +++ b/tests/spec/arb_texture_cube_map_array/sampler-cube-array-shadow.c
> @@ -48,8 +48,10 @@ static GLint prog;
>  
>  /* grab the coordinates from the main definition, and grab the
>     compvals from here */
> -static GLfloat cube_shadow_texcoords[6][4][5];
> +static GLfloat cube_shadow_attributes[6][4][9];
>  
> +static GLfloat verts[6][2] = { {100, 125}, {175, 125}, {250, 125},
> +			       {100, 200}, {175, 200}, {250, 200} };
>  static GLfloat compvals[6][4] = { { -0.50,  0.00,  0.50,  0.00 },
>  				  {  0.90,  0.20, -0.50,  0.20 },
>  				  {  0.35,  1.20,  0.35, -0.50 },
> @@ -57,27 +59,43 @@ static GLfloat compvals[6][4] = { { -0.50,  0.00,  0.50,  0.00 },
>  				  {  0.85,  0.85,  0.85,  0.85 },
>  				  {  0.90,  0.90,  0.90,  0.90 } };
>  
> -#define STRIDE (5 * sizeof(GLfloat))
> -void setup_texcoords(float layer_sample)
> +#define STRIDE (9 * sizeof(GLfloat))
> +/* Setup interlaced vertex attributes for 6 * 4 vertices:

In GL these are commonly called "interleaved" as opposed to interlaced.
Made sense either way, though.

Patches 1, 2 are:

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130621/63eb5f42/attachment.pgp>


More information about the Piglit mailing list