[Mesa-stable] [Mesa-dev] [PATCH 1/4] i965: Fall back to GL 4.2 on Haswell if the kernel isn't new enough.

Ilia Mirkin imirkin at alum.mit.edu
Thu Mar 16 22:18:54 UTC 2017


On Thu, Mar 16, 2017 at 6:12 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> In commit d2590eb65ff28a9cbd592353d15d7e6cbd2c6fc6 I enabled GL 4.5
> on Haswell...but failed to check if we could do indirect compute
> shader dispatch...and query buffer objects.
>
> Indirect compute shader dispatch requires command parser version 5
> (kernel commit 7b9748cb513a6bef4af87b79f0da3ff7e8b56cd8, which is in
> Linux v4.4).  On earlier kernels we would have disabled
> ARB_compute_shader, which is a mandatory part of OpenGL 4.3+.
>
> Query buffer objects currently require MI_MATH and MI_LOAD_REGISTER_REG,
> which mean command parser version 7 (Linux v4.8).  On earlier kernels
> we would have disabled ARB_query_buffer_object, which is a mandatory
> part of OpenGL 4.3+.

According to my notes, ARB_qbo is part of GL 4.4. Can you double-check?

>
> The new version support looks like:
>
> - Kernel 4.1 and older => OpenGL 3.3
> - Kernel 4.2-4.7       => OpenGL 4.2
> - Kernel 4.8+          => OpenGL 4.5
>
> Cc: "17.0" <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/drivers/dri/i965/intel_screen.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
> index 81cb0deabb3..225a387fa90 100644
> --- a/src/mesa/drivers/dri/i965/intel_screen.c
> +++ b/src/mesa/drivers/dri/i965/intel_screen.c
> @@ -1554,8 +1554,13 @@ set_max_gl_versions(struct intel_screen *screen)
>        dri_screen->max_gl_es2_version = has_astc ? 32 : 31;
>        break;
>     case 7:
> -      dri_screen->max_gl_core_version = screen->devinfo.is_haswell &&
> -         can_do_pipelined_register_writes(screen) ? 45 : 33;
> +      dri_screen->max_gl_core_version = 33;
> +      if (screen->devinfo.is_haswell &&
> +          can_do_pipelined_register_writes(screen) &&
> +          can_do_mi_math_and_lrr(screen)) {
> +         dri_screen->max_gl_core_version =
> +            can_do_compute_dispatch(screen) ? 45 : 42;
> +      }
>        dri_screen->max_gl_compat_version = 30;
>        dri_screen->max_gl_es1_version = 11;
>        dri_screen->max_gl_es2_version = screen->devinfo.is_haswell ? 31 : 30;
> --
> 2.12.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-stable mailing list