diff options
author | Marek Olšák <[email protected]> | 2016-02-11 22:04:35 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-02-21 21:08:57 +0100 |
commit | 9d5bf1a3ef7f8f48e94cede811b35ada516639d7 (patch) | |
tree | e17374d24f6cc732f43952d19fb6f5013854cd20 /src/gallium/drivers | |
parent | 09408764c1eafe0b75bfda0ce30ff7b76203a96c (diff) |
radeonsi: fail compilation if non-GS non-CS shaders have rodata
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 1a852c5cba2..50154c210be 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -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; } |