summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/cso_cache
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2016-02-18 00:18:29 +0100
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>2016-02-18 20:41:25 +0100
commitdfc95ad6d129436a3d2383152583919fb2dde261 (patch)
tree9f9f0ec56a79f6d73ee5636cfac81f8898252b2e /src/gallium/auxiliary/cso_cache
parent5c7f97426dee3678beb879c94cd8906c33b8f3dc (diff)
downloadexternal_mesa3d-dfc95ad6d129436a3d2383152583919fb2dde261.zip
external_mesa3d-dfc95ad6d129436a3d2383152583919fb2dde261.tar.gz
external_mesa3d-dfc95ad6d129436a3d2383152583919fb2dde261.tar.bz2
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 <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/gallium/auxiliary/cso_cache')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.c7
1 files changed, 6 insertions, 1 deletions
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) {