[Piglit] [PATCH 13/13] gles-3.0: Add minmax test

Eric Anholt eric at anholt.net
Wed Nov 28 12:52:26 PST 2012


Chad Versace <chad.versace at linux.intel.com> writes:

> This is the first GLES3 test.
>
> Tested against Mesa gles3-861a99d with Intel Sandybridge. All testcases
> pass except:
>
>   token                         min          actual
>   GL_MAX_ELEMENT_INDEX          16777215     16384

That sounds like a fun test to add.

>   GL_MAX_TEXTURE_LOD_BIAS              2.0  -9999.0
>   GL_MIN_PROGRAM_TEXEL_OFFSET         -8     9999

Oh, we're throwing errors here I guess.

> Currently, all.tests contains the GL tests, all_es1.tests contains the
> GLES1 tests, and all_es2.tests contains the GLES2 tests. This is the first
> GLES3 test, so I added the file all_es3.tests. We should really clean that
> up and put all tests in all.tests.

Any reason not to, given that now if the binaries aren't built they'll
just be skipped?

> +void
> +piglit_init(int argc, char **argv)
> +{
> +	GLint v_blocks;
> +	GLint v_uniforms;
> +	GLint f_blocks;
> +	GLint f_uniforms;
> +	GLint64 blocksize;
> +
> +	piglit_print_minmax_header();
> +
> +	glGetIntegerv(GL_MAX_VERTEX_UNIFORM_BLOCKS, &v_blocks);
> +	glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, &v_uniforms);
> +	glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_BLOCKS, &f_blocks);
> +	glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &f_uniforms);
> +	glGetInteger64v(GL_MAX_UNIFORM_BLOCK_SIZE, &blocksize);
> +
> +	/* Table 6.27 */
> +	piglit_test_min_int64(GL_MAX_ELEMENT_INDEX, (1 << 24) - 1);
> +	piglit_test_min_int(GL_SUBPIXEL_BITS, 4);
> +	piglit_test_min_int(GL_MAX_3D_TEXTURE_SIZE, 256);
> +	piglit_test_min_int(GL_MAX_TEXTURE_SIZE, 2048);
> +	piglit_test_min_int(GL_MAX_ARRAY_TEXTURE_LAYERS, 256);
> +	piglit_test_min_float(GL_MAX_TEXTURE_LOD_BIAS, 2.0);
> +	piglit_test_min_int(GL_MAX_CUBE_MAP_TEXTURE_SIZE, 2048);
> +	piglit_test_min_int(GL_MAX_RENDERBUFFER_SIZE, 2048);
> +	piglit_test_min_int(GL_MAX_DRAW_BUFFERS, 4);
> +	piglit_test_min_int(GL_MAX_COLOR_ATTACHMENTS, 4);

No testing for viewport dims here.  Can we just use the same code from
desktop gl?

> +	piglit_test_range_float(GL_ALIASED_POINT_SIZE_RANGE, 1, 1);
> +	piglit_test_range_float(GL_ALIASED_LINE_WIDTH_RANGE, 1, 1);

> +	/* Table 6.28 */
> +	piglit_test_min_int(GL_NUM_COMPRESSED_TEXTURE_FORMATS, 10);

Might as well also check the NUM_PROGRAM_BINARY_FORMATS,
NUM_SHADER_BINARY_FORMATS, and MAX_SERVER_WAIT_TIMEOUT here as well --
even though the min is 0, it will make sure we allow getting the value.
The minmax tests have caught corner cases like this in the past :)

-------------- 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/20121128/d41ef65c/attachment.pgp>


More information about the Piglit mailing list