diff options
Diffstat (limited to 'src/mesa/main/glspirv.c')
-rw-r--r-- | src/mesa/main/glspirv.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/glspirv.c b/src/mesa/main/glspirv.c index 73878d90365..21a1beb8453 100644 --- a/src/mesa/main/glspirv.c +++ b/src/mesa/main/glspirv.c @@ -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))) { + ralloc_asprintf_append(&prog->data->InfoLog, + "Compute shaders may not be linked with any other " + "type of shader\n"); + prog->data->LinkStatus = LINKING_FAILURE; + return; + } } nir_shader * |