[Mesa-dev] [PATCH] gallium/cso: only enable compute shaders when TGSI is supported
Marek Olšák
maraeo at gmail.com
Thu Feb 18 11:05:32 UTC 2016
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Thu, Feb 18, 2016 at 12:18 AM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94186
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/gallium/auxiliary/cso_cache/cso_context.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
> index 8cfb674..f0013f7 100644
> --- a/src/gallium/auxiliary/cso_cache/cso_context.c
> +++ b/src/gallium/auxiliary/cso_cache/cso_context.c
> @@ -278,7 +278,12 @@ struct cso_context *cso_create_context( struct pipe_context *pipe )
> }
> if (pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_COMPUTE,
> PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) {
> - ctx->has_compute_shader = TRUE;
> + int supported_irs =
> + pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_COMPUTE,
> + PIPE_SHADER_CAP_SUPPORTED_IRS);
> + if (supported_irs & (1 << PIPE_SHADER_IR_TGSI)) {
> + ctx->has_compute_shader = TRUE;
> + }
> }
> if (pipe->screen->get_param(pipe->screen,
> PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS) != 0) {
> --
> 2.6.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