[Piglit] [PATCH] util/gl: Change default waffle platform
Kenneth Graunke
kenneth at whitecape.org
Wed May 15 21:05:37 PDT 2013
On 05/15/2013 02:32 PM, Chad Versace wrote:
> Change default waffle platform from GLX to XEGL for GLES tests.
>
> The default platform was GLX for all GL tests (GL and GLES). But not all
> GLX implementations support creation of ES1 and ES2 contexts. Unless the
> user explicitly set PIGLIT_PLATFORM to some EGL platform, this problem
> caused GLES tests to skip.
>
> Enables 76 GLES tests on my system.
I presume GLX tests keep working with this change (just those tests use
GLX)?
If so,
Acked-by: Kenneth Graunke <kenneth at whitecape.org>
> CC: Eric Anholt <eric at anholt.net>
> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
> ---
> tests/util/piglit-framework-gl/piglit_fbo_framework.c | 2 +-
> tests/util/piglit-framework-gl/piglit_wfl_framework.c | 10 +++++++++-
> tests/util/piglit-framework-gl/piglit_wfl_framework.h | 2 +-
> tests/util/piglit-framework-gl/piglit_winsys_framework.c | 2 +-
> 4 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/tests/util/piglit-framework-gl/piglit_fbo_framework.c b/tests/util/piglit-framework-gl/piglit_fbo_framework.c
> index da2c601..1b844bb 100644
> --- a/tests/util/piglit-framework-gl/piglit_fbo_framework.c
> +++ b/tests/util/piglit-framework-gl/piglit_fbo_framework.c
> @@ -136,7 +136,7 @@ piglit_fbo_framework_create(const struct piglit_gl_test_config *test_config)
> struct piglit_wfl_framework *wfl_fw;
> struct piglit_gl_framework *gl_fw;
>
> - int32_t platform = piglit_wfl_framework_choose_platform();
> + int32_t platform = piglit_wfl_framework_choose_platform(test_config);
> bool ok = true;
>
> wfl_fw = calloc(1, sizeof(*wfl_fw));
> diff --git a/tests/util/piglit-framework-gl/piglit_wfl_framework.c b/tests/util/piglit-framework-gl/piglit_wfl_framework.c
> index 5c24f7c..801a258 100644
> --- a/tests/util/piglit-framework-gl/piglit_wfl_framework.c
> +++ b/tests/util/piglit-framework-gl/piglit_wfl_framework.c
> @@ -41,11 +41,19 @@ piglit_wfl_framework(struct piglit_gl_framework *gl_fw)
> }
>
> int32_t
> -piglit_wfl_framework_choose_platform(void)
> +piglit_wfl_framework_choose_platform(const struct piglit_gl_test_config *test_config)
> {
> const char *env = getenv("PIGLIT_PLATFORM");
>
> if (env == NULL) {
> +#if defined(PIGLIT_HAS_X11) && defined(PIGLIT_HAS_EGL)
> + if (test_config->supports_gl_es_version) {
> + /* Some GLX implementations don't support creation of
> + * ES1 and ES2 contexts, so use XEGL instead.
> + */
> + return WAFFLE_PLATFORM_X11_EGL;
> + }
> +#endif
> #ifdef PIGLIT_HAS_GLX
> return WAFFLE_PLATFORM_GLX;
> #else
> diff --git a/tests/util/piglit-framework-gl/piglit_wfl_framework.h b/tests/util/piglit-framework-gl/piglit_wfl_framework.h
> index fe14991..d7506f1 100644
> --- a/tests/util/piglit-framework-gl/piglit_wfl_framework.h
> +++ b/tests/util/piglit-framework-gl/piglit_wfl_framework.h
> @@ -64,4 +64,4 @@ piglit_wfl_framework_teardown(struct piglit_wfl_framework *wfl_fw);
> * WAFFLE_PLATFORM_*.
> */
> int32_t
> -piglit_wfl_framework_choose_platform(void);
> +piglit_wfl_framework_choose_platform(const struct piglit_gl_test_config *test_config);
> diff --git a/tests/util/piglit-framework-gl/piglit_winsys_framework.c b/tests/util/piglit-framework-gl/piglit_winsys_framework.c
> index df74542..971f183 100644
> --- a/tests/util/piglit-framework-gl/piglit_winsys_framework.c
> +++ b/tests/util/piglit-framework-gl/piglit_winsys_framework.c
> @@ -136,7 +136,7 @@ choose_config_attribs(const struct piglit_gl_test_config *test_config)
> struct piglit_gl_framework*
> piglit_winsys_framework_factory(const struct piglit_gl_test_config *test_config)
> {
> - int32_t platform = piglit_wfl_framework_choose_platform();
> + int32_t platform = piglit_wfl_framework_choose_platform(test_config);
>
> switch (platform) {
> #ifdef PIGLIT_HAS_X11
>
More information about the Piglit
mailing list