On 04/09/18 17:24, Michel Dänzer wrote:
> From: Michel Dänzer <michel.daen...@amd.com>
>
> Without this, validate_current_gl_context never returns true if
> spirv_replaces_glsl == true, resulting in repeatedly calling
> recreate_gl_context indefinitely after the first subtest.

Hi, could you provide some extra details? From "indefinitely" I'm
understanding that shader_runs hangs. How I can reproduce this bug?
Calling shader_runner for individual tests, or piglit run to run several
tests works for me. Unless you mean that recreate_gl_context is called
too many times, and that this commit just prevents that.

>
> Fixes: 0baf4e2708c "shader_runner/spirv: support loading SPIR-V shaders"
> Signed-off-by: Michel Dänzer <michel.daen...@amd.com>
> ---
>  tests/shaders/shader_runner.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
> index cc377cb5e..6df8bd860 100644
> --- a/tests/shaders/shader_runner.c
> +++ b/tests/shaders/shader_runner.c
> @@ -39,6 +39,7 @@
>  #define DEFAULT_WINDOW_WIDTH 250
>  #define DEFAULT_WINDOW_HEIGHT 250
>  
> +static bool spirv_replaces_glsl = false;
>  static struct piglit_gl_test_config current_config;
>  
>  static void
> @@ -61,7 +62,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
>        * [require] section, so it will be handled later.
>        */
>       if (argc > 1) {
> -             get_required_config(argv[1], false, &config);
> +             get_required_config(argv[1], spirv_replaces_glsl, &config);
>       } else {
>               config.supports_gl_compat_version = 10;
>       }
> @@ -154,7 +155,6 @@ static bool sso_in_use = false;
>  static bool glsl_in_use = false;
>  static bool force_glsl = false;
>  static bool spirv_in_use = false;
> -static bool spirv_replaces_glsl = false;
>  static GLchar *prog_err_info = NULL;
>  static GLuint vao = 0;
>  static GLuint draw_fbo, read_fbo;

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to