diff options
author | Marek Olšák <[email protected]> | 2015-12-27 23:47:00 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-01-07 18:26:06 +0100 |
commit | 54ed83669e637ebfe269fc88d2e3924401b2a827 (patch) | |
tree | fece9567d9f75f96d64468ae09e007b908e4cf32 /src/gallium/drivers/radeonsi/si_shader.c | |
parent | f20a76a4fd7eb176f2f3c09b7596a05be1961b75 (diff) |
radeonsi: move si_shader_binary_upload out of si_compile_llvm
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 | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index bcc9f658a7b..2a206dd6290 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -3902,10 +3902,6 @@ int si_compile_llvm(struct si_screen *sscreen, struct si_shader *shader, si_shader_binary_read(sscreen, &shader->binary, &shader->config, debug, processor); - r = si_shader_binary_upload(sscreen, shader); - if (r) - return r; - FREE(shader->binary.config); FREE(shader->binary.global_symbol_offsets); shader->binary.config = NULL; @@ -3986,6 +3982,8 @@ static int si_generate_gs_copy_shader(struct si_screen *sscreen, r = si_compile_llvm(sscreen, si_shader_ctx->shader, si_shader_ctx->tm, bld_base->base.gallivm->module, debug, TGSI_PROCESSOR_GEOMETRY); + if (!r) + r = si_shader_binary_upload(sscreen, si_shader_ctx->shader); radeon_llvm_dispose(&si_shader_ctx->radeon_bld); @@ -4186,6 +4184,12 @@ int si_shader_create(struct si_screen *sscreen, LLVMTargetMachineRef tm, goto out; } + r = si_shader_binary_upload(sscreen, shader); + if (r) { + fprintf(stderr, "LLVM failed to upload shader\n"); + goto out; + } + radeon_llvm_dispose(&si_shader_ctx.radeon_bld); if (si_shader_ctx.type == TGSI_PROCESSOR_GEOMETRY) { |