aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-03-31 13:03:03 +0200
committerNicolai Hähnle <[email protected]>2017-04-14 22:51:07 +0200
commitd6588d9962e8bf3965f2d333101ea8179a176d19 (patch)
treeb2491b732caf96830836ed4687b90494c5f33e83 /src/gallium
parentd15b1f6e2d8b250656e7023d48cdfd623511154e (diff)
radeonsi: cope with missing disassembly
For robustness and testing purposes. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 78c7495ce8f..c52ffd90f76 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -113,7 +113,8 @@ static void *si_get_shader_binary(struct si_shader *shader)
/* There is always a size of data followed by the data itself. */
unsigned relocs_size = shader->binary.reloc_count *
sizeof(shader->binary.relocs[0]);
- unsigned disasm_size = strlen(shader->binary.disasm_string) + 1;
+ unsigned disasm_size = shader->binary.disasm_string ?
+ strlen(shader->binary.disasm_string) + 1 : 0;
unsigned llvm_ir_size = shader->binary.llvm_ir_string ?
strlen(shader->binary.llvm_ir_string) + 1 : 0;
unsigned size =