dump = debug_get_bool_option("RADEON_DUMP_SHADERS", FALSE);
+ memset(&si_shader_ctx.radeon_bld, 0, sizeof(si_shader_ctx.radeon_bld));
radeon_llvm_context_init(&si_shader_ctx.radeon_bld);
bld_base = &si_shader_ctx.radeon_bld.soa.bld_base;
tgsi_dump(shader->tokens, 0);
}
- lp_build_tgsi_llvm(bld_base, shader->tokens);
+ if (!lp_build_tgsi_llvm(bld_base, shader->tokens)) {
+ fprintf(stderr, "Failed to translate shader from TGSI to LLVM\n");
+ return -EINVAL;
+ }
radeon_llvm_finalize_module(&si_shader_ctx.radeon_bld);