Fixes piglit test:
spec/ARB_compute_shader/linker/mix_compute_and_non_compute
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
goto done;
}
+ /* Compute shaders have additional restrictions. */
+ if (num_shaders[MESA_SHADER_COMPUTE] > 0 &&
+ num_shaders[MESA_SHADER_COMPUTE] != prog->NumShaders) {
+ linker_error(prog, "Compute shaders may not be linked with any other "
+ "type of shader\n");
+ }
+
for (unsigned int i = 0; i < MESA_SHADER_STAGES; i++) {
if (prog->_LinkedShaders[i] != NULL)
ctx->Driver.DeleteShader(ctx, prog->_LinkedShaders[i]);