[Piglit] [PATCH 3/4] egl_khr_create_context: Verify that the core profile is supported for Desktop GL 3.2
Chad Versace
chad.versace at linux.intel.com
Wed Oct 10 10:44:18 PDT 2012
On 10/08/2012 04:57 PM, Matt Turner wrote:
> ---
> We fail this test for an undiagnosed reason currently. Requesting major=3 minor>=4
> is rejected immediately by the EGL code, but requesting 3.2 and 3.3 contexts (which
> the driver doesn't currently support) does not return the correct error.
>
> tests/all_egl.tests | 1 +
> .../spec/egl_khr_create_context/CMakeLists.gl.txt | 1 +
> .../egl/spec/egl_khr_create_context/core-profile.c | 156 ++++++++++++++++++++
> 3 files changed, 158 insertions(+), 0 deletions(-)
> create mode 100644 tests/egl/spec/egl_khr_create_context/core-profile.c
>
> diff --git a/tests/all_egl.tests b/tests/all_egl.tests
> index 12d4edc..cd8a596 100644
> --- a/tests/all_egl.tests
> +++ b/tests/all_egl.tests
> @@ -35,3 +35,4 @@ create_context['invalid flag GLES'] = plain_test('egl-create-context-invalid-fla
> create_context['invalid flag GL'] = plain_test('egl-create-context-invalid-flag-gl')
> create_context['valid forward-compatible flag GL'] = plain_test('egl-create-context-valid-flag-forward-compatible-gl')
> create_context['invalid profile'] = plain_test('egl-create-context-invalid-profile')
> +create_context['3.2 core profile required'] = plain_test('egl-create-context-core-profile')
> diff --git a/tests/egl/spec/egl_khr_create_context/CMakeLists.gl.txt b/tests/egl/spec/egl_khr_create_context/CMakeLists.gl.txt
> index 240a007..656291c 100644
> --- a/tests/egl/spec/egl_khr_create_context/CMakeLists.gl.txt
> +++ b/tests/egl/spec/egl_khr_create_context/CMakeLists.gl.txt
> @@ -26,5 +26,6 @@ piglit_add_executable (egl-create-context-invalid-flag-gles invalid-flag-gles.c
> piglit_add_executable (egl-create-context-invalid-flag-gl invalid-flag-gl.c common.c)
> piglit_add_executable (egl-create-context-invalid-profile invalid-profile.c common.c)
> piglit_add_executable (egl-create-context-valid-flag-forward-compatible-gl valid-flag-forward-compatible-gl.c common.c)
> +piglit_add_executable (egl-create-context-core-profile core-profile.c common.c)
>
> # vim: ft=cmake:
> diff --git a/tests/egl/spec/egl_khr_create_context/core-profile.c b/tests/egl/spec/egl_khr_create_context/core-profile.c
> new file mode 100644
> index 0000000..04e1a18
> --- /dev/null
> +++ b/tests/egl/spec/egl_khr_create_context/core-profile.c
> @@ -0,0 +1,156 @@
> +/* Copyright © 2012 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> + * IN THE SOFTWARE.
> + */
Ditto as in patch 2/4; the test needs some brief documentation here.
> +#include "piglit-util-gl-common.h"
> +#include "piglit-util-egl.h"
> +#include "common.h"
> +
> + /* Creation of a core context with or without the core profile mask
> + * should have the same result.
> + */
> + if (got_core_with_profile != got_core_without_profile) {
> + fprintf(stderr,
> + "Core profile context was created %s profile mask "
> + "but not\n"
^^ newline #1
> + "%s profile mask.\n",
^^ newline #2
The error message should be split better or just be a single line.
> + got_core_with_profile ? "with" : "without",
> + got_core_with_profile ? "without" : "with");
> + pass = false;
> + }
Otherwise, the test looks good.
More information about the Piglit
mailing list