code, header->num_bytes);
si_compile_llvm(sctx->screen, &program->kernels[i], sctx->tm,
mod, &sctx->b.debug, TGSI_PROCESSOR_COMPUTE);
+ si_shader_binary_upload(sctx->screen, &program->kernels[i]);
LLVMDisposeModule(mod);
}
}
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;
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);
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) {