radeonsi: fail compilation if non-GS non-CS shaders have rodata

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Marek Olšák 2016-02-11 22:04:35 +01:00
parent 09408764c1
commit 9d5bf1a3ef
1 changed files with 13 additions and 0 deletions

View File

@ -4239,6 +4239,19 @@ int si_compile_llvm(struct si_screen *sscreen,
FREE(binary->global_symbol_offsets);
binary->config = NULL;
binary->global_symbol_offsets = NULL;
/* Some shaders can't have rodata because their binaries can be
* concatenated.
*/
if (binary->rodata_size &&
(processor == TGSI_PROCESSOR_VERTEX ||
processor == TGSI_PROCESSOR_TESS_CTRL ||
processor == TGSI_PROCESSOR_TESS_EVAL ||
processor == TGSI_PROCESSOR_FRAGMENT)) {
fprintf(stderr, "radeonsi: The shader can't have rodata.");
return -EINVAL;
}
return r;
}