ac/llvm: move the gfx6 optimization for TCS barriers into ac_build_s_barrier

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16304>
This commit is contained in:
Marek Olšák
2022-05-02 21:58:35 -04:00
committed by Marge Bot
parent e4882d6b7e
commit b48d183633
4 changed files with 9 additions and 21 deletions

View File

@@ -390,6 +390,12 @@ LLVMValueRef ac_build_phi(struct ac_llvm_context *ctx, LLVMTypeRef type, unsigne
void ac_build_s_barrier(struct ac_llvm_context *ctx, gl_shader_stage stage)
{
/* GFX6 only: s_barrier isnt needed in TCS because an entire patch always fits into
* a single wave due to a bug workaround disallowing multi-wave HS workgroups.
*/
if (ctx->chip_class == GFX6 && stage == MESA_SHADER_TESS_CTRL)
return;
ac_build_intrinsic(ctx, "llvm.amdgcn.s.barrier", ctx->voidt, NULL, 0, AC_FUNC_ATTR_CONVERGENT);
}