virgl: Apply TGSI transforms to compute shaders, too.

We need to do this for the upcoming virglrenderer workarounds.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15014>
This commit is contained in:
Emma Anholt 2022-01-05 10:59:16 -08:00 committed by Marge Bot
parent c491afaeab
commit f25ccac374
1 changed files with 6 additions and 1 deletions

View File

@ -1372,17 +1372,22 @@ static void *virgl_create_compute_state(struct pipe_context *ctx,
tokens = state->prog;
}
void *new_tokens = virgl_tgsi_transform((struct virgl_screen *)vctx->base.screen, tokens);
if (!new_tokens)
return NULL;
handle = virgl_object_assign_handle();
ret = virgl_encode_shader_state(vctx, handle, PIPE_SHADER_COMPUTE,
&so_info,
state->req_local_mem,
tokens);
new_tokens);
if (ret) {
FREE((void *)ntt_tokens);
return NULL;
}
FREE((void *)ntt_tokens);
FREE(new_tokens);
return (void *)(unsigned long)handle;
}