[Mesa-dev] [PATCH 1/2] mesa: Don't advertise GLES 3.1 without compute support

Marek Olšák maraeo at gmail.com
Wed May 18 16:22:09 UTC 2016


Thanks, I'm going to push this soon.

Marek

On Tue, Apr 19, 2016 at 4:57 PM, Daniel Scharrer <daniel at constexpr.org> wrote:
> The MaxComputeWorkGroupInvocations constant is used in
> compute_version_es2() instead of extensions->ARB_compute_shader
> as ES has lower requirements than desktop GL.
>
> Both i965 and gallium set this constant before enabling compute support.
>
> Signed-off-by: Daniel Scharrer <daniel at constexpr.org>
> ---
>
> This currently causes radeonsi to erroneously report GLES 3.1 support
> as compute is the last missing part.
>
> Even if the radeonsi compute patches land soon, they depend on a new
> LLVM version (and for SI also new kernel), and this may affect other
> drivers in the future.
>
> Tested on radeonsi only.
>
> I don't have commit access, so if this patch is acceptable someone else
> will need to push it.
>
>
>  src/mesa/main/context.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
> index 6af02d1..f690799 100644
> --- a/src/mesa/main/context.c
> +++ b/src/mesa/main/context.c
> @@ -708,7 +708,8 @@ _mesa_init_constants(struct gl_constants *consts, gl_api api)
>     consts->MaxComputeWorkGroupSize[0] = 1024;
>     consts->MaxComputeWorkGroupSize[1] = 1024;
>     consts->MaxComputeWorkGroupSize[2] = 64;
> -   consts->MaxComputeWorkGroupInvocations = 1024;
> +   /* Enables compute support for GLES 3.1 if >= 128 */
> +   consts->MaxComputeWorkGroupInvocations = 0;
>
>     /** GL_ARB_gpu_shader5 */
>     consts->MinFragmentInterpolationOffset = MIN_FRAGMENT_INTERPOLATION_OFFSET;
> --
> 2.8.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list