diff options
author | Marek Olšák <[email protected]> | 2019-07-23 20:34:03 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-07-30 22:06:23 -0400 |
commit | 0ef4c1c04d5c0a9cadd344caff38d443509d496f (patch) | |
tree | 0c0df49824050e963f36f345638e64d00e6a7f9a /src/gallium/drivers/radeonsi | |
parent | 6ec7d603f58992904f2e0cbfe9f6e417c34c9ef5 (diff) |
radeonsi: don't use lp_build_if for the wrapping if block in merged shaders
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/gfx10_shader_ngg.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 11 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_internal.h | 3 |
3 files changed, 11 insertions, 7 deletions
diff --git a/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c b/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c index f5899511138..27be0661006 100644 --- a/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c +++ b/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c @@ -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); diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index edac0ca1dd2..886ee092c22 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -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 diff --git a/src/gallium/drivers/radeonsi/si_shader_internal.h b/src/gallium/drivers/radeonsi/si_shader_internal.h index b4bee5e22e2..ae99bf5d374 100644 --- a/src/gallium/drivers/radeonsi/si_shader_internal.h +++ b/src/gallium/drivers/radeonsi/si_shader_internal.h @@ -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; |