The test is based on link_shaders().
For example, it allows the following test (when run on SPIR-V mode) to
pass:
spec/arb_compute_shader/linker/mix_compute_and_non_compute.shader_test
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
}
}
}
+
+ /* 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 *