From: Samuel Pitoiset Date: Wed, 17 Feb 2016 23:18:29 +0000 (+0100) Subject: gallium/cso: only enable compute shaders when TGSI is supported X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dfc95ad6d129436a3d2383152583919fb2dde261;p=mesa.git gallium/cso: only enable compute shaders when TGSI is supported Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94186 Signed-off-by: Samuel Pitoiset Reviewed-by: Marek Olšák --- diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index 8cfb6746e61..f0013f70472 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) {