diff options
author | Nicolai Hähnle <[email protected]> | 2016-08-10 18:41:21 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-08-17 12:11:23 +0200 |
commit | 7c2295d7efba2178c22e0caf9d9166db81ea7329 (patch) | |
tree | 1885cc98283fd02eb9ea5d0b21f5362a8ee3dd52 /src/gallium/drivers/radeonsi | |
parent | 850c8dcc9c4ab36bb9bbd8607f0f5caa9b7d968a (diff) |
gallium/radeon: allocate temps array info in radeon_llvm_context_init
Also, prepare for using tgsi_array_info.
This also opens the door for properly handling allocation failures, but I'm
leaving that for a separate change.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 2de20cb1bd0..c595ee00482 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -6522,7 +6522,9 @@ static void si_init_shader_ctx(struct si_shader_context *ctx, struct lp_build_tgsi_action tmpl = {}; memset(ctx, 0, sizeof(*ctx)); - radeon_llvm_context_init(&ctx->radeon_bld, "amdgcn--"); + radeon_llvm_context_init( + &ctx->radeon_bld, "amdgcn--", + (shader && shader->selector) ? &shader->selector->info : NULL); ctx->tm = tm; ctx->screen = sscreen; if (shader && shader->selector) @@ -6545,8 +6547,6 @@ static void si_init_shader_ctx(struct si_shader_context *ctx, ctx->v8i32 = LLVMVectorType(ctx->i32, 8); bld_base = &ctx->radeon_bld.soa.bld_base; - if (shader && shader->selector) - bld_base->info = &shader->selector->info; bld_base->emit_fetch_funcs[TGSI_FILE_CONSTANT] = fetch_constant; bld_base->op_actions[TGSI_OPCODE_INTERP_CENTROID] = interp_action; |