diff options
author | Marek Olšák <[email protected]> | 2015-12-27 23:35:08 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-01-07 18:26:06 +0100 |
commit | f20a76a4fd7eb176f2f3c09b7596a05be1961b75 (patch) | |
tree | c21647ebd8aee4542ccdcc439b9e0822a02e1123 /src/gallium/drivers/radeonsi/si_shader.c | |
parent | 63345cfc3a8a0f2d9bb16deef2a24cebe9045642 (diff) |
radeonsi: always keep shader code, rodata, and relocs in memory
We won't compile shaders in draw calls, but we will concatenate shader
binaries according to states in draw calls, so keep the binaries.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 9f6f3e1f4a6..bcc9f658a7b 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -3907,14 +3907,9 @@ int si_compile_llvm(struct si_screen *sscreen, struct si_shader *shader, return r; FREE(shader->binary.config); - FREE(shader->binary.rodata); FREE(shader->binary.global_symbol_offsets); - if (shader->config.scratch_bytes_per_wave == 0) { - FREE(shader->binary.code); - FREE(shader->binary.relocs); - memset(&shader->binary, 0, - offsetof(struct radeon_shader_binary, disasm_string)); - } + shader->binary.config = NULL; + shader->binary.global_symbol_offsets = NULL; return r; } @@ -4227,6 +4222,7 @@ void si_shader_destroy(struct si_shader *shader) r600_resource_reference(&shader->bo, NULL); FREE(shader->binary.code); + FREE(shader->binary.rodata); FREE(shader->binary.relocs); FREE(shader->binary.disasm_string); } |