[Mesa-dev] [PATCH 19/20] mesa/st: enable compute shaders if images are also supported

Ilia Mirkin imirkin at alum.mit.edu
Sat Apr 2 16:08:15 UTC 2016


On Sat, Apr 2, 2016 at 9:11 AM, Bas Nieuwenhuizen
<bas at basnieuwenhuizen.nl> wrote:
> Signed-off-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
> ---
>  src/mesa/state_tracker/st_extensions.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index 6c0df8d..7bbe87d 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -1139,9 +1139,9 @@ void st_init_extensions(struct pipe_screen *screen,
>              consts->MaxComputeWorkGroupCount[i] = grid_size[i];
>              consts->MaxComputeWorkGroupSize[i] = block_size[i];
>           }
> -         /* XXX: ARB_compute_shader is not enabled by default because images
> -          * support is still not implemented yet. */
> -         /* extensions->ARB_compute_shader = true; */
> +
> +         if (extensions->ARB_shader_image_load_store)
> +            extensions->ARB_compute_shader = true;

Nominally, GL_ARB_compute_shader requires GL 4.2. In practice, I think
this means you need images *and* atomic counters. I'd change it to

if (extensions->ARB_shader_image_load_store &&
extensions->ARB_shader_atomic_counters)

Or even

extensions->ARB_compute_shader =
extensions->ARB_shader_image_load_store &&
extensions->ARB_shader_atomic_counters

  -ilia

>        }
>     }
>  }
> --
> 2.7.4
>
> _______________________________________________
> 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