Commit 84196211 authored by Neil Roberts's avatar Neil Roberts Committed by Alejandro Piñeiro

mesa/glspirv: Validate that compute shaders are not linked with other stages

The test is based on link_shaders().

For example, it allows the following test (when run on SPIR-V mode) to
Reviewed-by: Caio Marcelo de Oliveira Filho's avatarCaio Marcelo de Oliveira Filho <>
parent 022e9ddd
Pipeline #48498 passed with stages
in 37 minutes and 20 seconds
......@@ -203,6 +203,16 @@ _mesa_spirv_link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
/* Compute shaders have additional restrictions. */
if ((prog->data->linked_stages & (1 << MESA_SHADER_COMPUTE)) &&
(prog->data->linked_stages & ~(1 << MESA_SHADER_COMPUTE))) {
"Compute shaders may not be linked with any other "
"type of shader\n");
prog->data->LinkStatus = LINKING_FAILURE;
nir_shader *
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment