diff options
author | Nicolai Hähnle <[email protected]> | 2017-07-14 15:10:58 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-07-27 21:16:45 +0200 |
commit | 06e20c4b8c59104b789981e6d98f3d13bfa8d69f (patch) | |
tree | db6455389c227bc7ef594a7e3f1f5f2a13b60625 | |
parent | 4dd86631f41ecee03c18cbc6759ef00c25d081cd (diff) |
radeonsi: bail out instead of crashing if the main shader part failed to compile
Reviewed: Marek Olšák <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 4a36923ae8c..35bdd85afcf 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -7379,6 +7379,9 @@ int si_shader_create(struct si_screen *sscreen, LLVMTargetMachineRef tm, * the previous shader stage. */ + if (!mainp) + return -1; + /* Copy the compiled TGSI shader data over. */ shader->is_binary_shared = true; shader->binary = mainp->binary; |