radeonsi: don't use lp_build_if for the wrapping if block in merged shaders
This commit is contained in:
parent
6ec7d603f5
commit
0ef4c1c04d
|
@ -581,7 +581,7 @@ void gfx10_emit_ngg_epilogue(struct ac_shader_abi *abi,
|
|||
}
|
||||
}
|
||||
|
||||
lp_build_endif(&ctx->merged_wrap_if_state);
|
||||
ac_build_endif(&ctx->ac, ctx->merged_wrap_if_label);
|
||||
|
||||
LLVMValueRef prims_in_wave = si_unpack_param(ctx, ctx->param_merged_wave_info, 8, 8);
|
||||
LLVMValueRef vtx_in_wave = si_unpack_param(ctx, ctx->param_merged_wave_info, 0, 8);
|
||||
|
@ -1058,7 +1058,7 @@ void gfx10_ngg_gs_emit_epilogue(struct si_shader_context *ctx)
|
|||
ac_build_endif(&ctx->ac, 5105);
|
||||
}
|
||||
|
||||
lp_build_endif(&ctx->merged_wrap_if_state);
|
||||
ac_build_endif(&ctx->ac, ctx->merged_wrap_if_label);
|
||||
|
||||
ac_build_s_barrier(&ctx->ac);
|
||||
|
||||
|
|
|
@ -3329,11 +3329,11 @@ static void si_llvm_emit_tcs_epilogue(struct ac_shader_abi *abi,
|
|||
if (ctx->screen->info.chip_class >= GFX9) {
|
||||
LLVMBasicBlockRef blocks[2] = {
|
||||
LLVMGetInsertBlock(builder),
|
||||
ctx->merged_wrap_if_state.entry_block
|
||||
ctx->merged_wrap_if_entry_block
|
||||
};
|
||||
LLVMValueRef values[2];
|
||||
|
||||
lp_build_endif(&ctx->merged_wrap_if_state);
|
||||
ac_build_endif(&ctx->ac, ctx->merged_wrap_if_label);
|
||||
|
||||
values[0] = rel_patch_id;
|
||||
values[1] = LLVMGetUndef(ctx->i32);
|
||||
|
@ -3617,7 +3617,7 @@ static void emit_gs_epilogue(struct si_shader_context *ctx)
|
|||
si_get_gs_wave_id(ctx));
|
||||
|
||||
if (ctx->screen->info.chip_class >= GFX9)
|
||||
lp_build_endif(&ctx->merged_wrap_if_state);
|
||||
ac_build_endif(&ctx->ac, ctx->merged_wrap_if_label);
|
||||
}
|
||||
|
||||
static void si_llvm_emit_gs_epilogue(struct ac_shader_abi *abi,
|
||||
|
@ -6246,7 +6246,10 @@ static bool si_compile_tgsi_main(struct si_shader_context *ctx)
|
|||
LLVMValueRef ena =
|
||||
LLVMBuildICmp(ctx->ac.builder, LLVMIntULT,
|
||||
ac_get_thread_id(&ctx->ac), num_threads, "");
|
||||
lp_build_if(&ctx->merged_wrap_if_state, &ctx->gallivm, ena);
|
||||
|
||||
ctx->merged_wrap_if_entry_block = LLVMGetInsertBlock(ctx->ac.builder);
|
||||
ctx->merged_wrap_if_label = 11500;
|
||||
ac_build_ifcc(&ctx->ac, ena, ctx->merged_wrap_if_label);
|
||||
|
||||
if (nested_barrier) {
|
||||
/* Execute a barrier before the second shader in
|
||||
|
|
|
@ -112,7 +112,8 @@ struct si_shader_context {
|
|||
LLVMValueRef *imms;
|
||||
unsigned imms_num;
|
||||
|
||||
struct lp_build_if_state merged_wrap_if_state;
|
||||
LLVMBasicBlockRef merged_wrap_if_entry_block;
|
||||
int merged_wrap_if_label;
|
||||
|
||||
struct tgsi_array_info *temp_arrays;
|
||||
LLVMValueRef *temp_array_allocas;
|
||||
|
|
Loading…
Reference in New Issue