Hi Tapani

On 20/04/15 08:16, Tapani Pälli wrote:
> All other tests except invalid_enum_check pass on Nvidia
> binary driver (version 346.35).
> 
> Signed-off-by: Tapani Pälli <[email protected]>
> ---
>  tests/all.py                                       |   1 +
>  .../CMakeLists.gl.txt                              |   1 +
>  tests/spec/arb_framebuffer_no_attachments/params.c | 297 
> +++++++++++++++++++++
>  3 files changed, 299 insertions(+)
>  create mode 100755 tests/spec/arb_framebuffer_no_attachments/params.c


> --- /dev/null
> +++ b/tests/spec/arb_framebuffer_no_attachments/params.c

> +struct test_t {
> +     GLenum param;
> +     GLint default_value;
> +     GLint value;
> +     GLint max_value;
> +     const char *extension;
> +} tests[] = {
> +     { GL_FRAMEBUFFER_DEFAULT_WIDTH,
> +             0, 0, GL_MAX_FRAMEBUFFER_WIDTH, NULL },
> +     { GL_FRAMEBUFFER_DEFAULT_HEIGHT,
> +             0, 0, GL_MAX_FRAMEBUFFER_HEIGHT, NULL },
> +     { GL_FRAMEBUFFER_DEFAULT_LAYERS,
> +             0, 0, GL_MAX_FRAMEBUFFER_LAYERS, "EXT_texture_array" },
> +     { GL_FRAMEBUFFER_DEFAULT_SAMPLES,
> +             0, 0, GL_MAX_FRAMEBUFFER_SAMPLES, NULL },
> +     { GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS,
> +             0, 0, 0, NULL }
> +};
> +
Can you annotate this as static and/or const and move it after the
PIGLIT_GL_TEST_CONFIG* boilerplate ?

> +PIGLIT_GL_TEST_CONFIG_BEGIN
> +
> +     config.supports_gl_compat_version = 20;
> +
> +PIGLIT_GL_TEST_CONFIG_END
> +
> +enum piglit_result
> +piglit_display(void)
> +{
> +     return PIGLIT_FAIL;
> +}

...
> +static bool
> +dsa_subtest(GLuint fbo)
> +{
> +     unsigned i;
> +     bool pass = true;
> +
> +     if (!piglit_is_extension_supported("GL_ARB_direct_state_access"))
> +             piglit_report_subtest_result(PIGLIT_SKIP, "dsa");
> +
> +     for (i = 0; i < sizeof(tests)/sizeof(struct test_t); i++) {
You can use the ARRAY_SIZE() macro. There are a few more cases through
the rest of the file.

Cheers
Emil
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to