mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
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>
This commit is contained in:
parent
5c7f97426d
commit
dfc95ad6d1
1 changed files with 6 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue