From e80e8d7adc5f497b7d25978611b8cdca7458b47c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 15 Aug 2018 21:43:32 -0400 Subject: [PATCH] ac: fix WAITCNT flags for GFX9 Reviewed-by: Samuel Pitoiset --- src/amd/common/ac_llvm_build.h | 6 ++++++ src/amd/common/ac_nir_to_llvm.c | 4 ---- src/gallium/drivers/radeonsi/si_shader_internal.h | 5 ----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h index d11a6ebb1be..b080cca4cb7 100644 --- a/src/amd/common/ac_llvm_build.h +++ b/src/amd/common/ac_llvm_build.h @@ -43,6 +43,12 @@ enum { AC_CONST_32BIT_ADDR_SPACE = 6, /* same as CONST, but the pointer type has 32 bits */ }; +/* Combine these with & instead of |. */ +#define NOOP_WAITCNT 0xcf7f +#define LGKM_CNT 0xc07f +#define EXP_CNT 0xcf0f +#define VM_CNT 0x0f70 /* On GFX9, vmcnt has 6 bits in [0:3] and [14:15] */ + struct ac_llvm_flow; struct ac_llvm_context { diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 90df1e00623..3845a721a77 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -2537,10 +2537,6 @@ static LLVMValueRef visit_image_size(struct ac_nir_context *ctx, return res; } -#define NOOP_WAITCNT 0xf7f -#define LGKM_CNT 0x07f -#define VM_CNT 0xf70 - static void emit_membar(struct ac_llvm_context *ac, const nir_intrinsic_instr *instr) { diff --git a/src/gallium/drivers/radeonsi/si_shader_internal.h b/src/gallium/drivers/radeonsi/si_shader_internal.h index ac7784f7d46..aff7e0472db 100644 --- a/src/gallium/drivers/radeonsi/si_shader_internal.h +++ b/src/gallium/drivers/radeonsi/si_shader_internal.h @@ -288,11 +288,6 @@ void si_llvm_emit_store(struct lp_build_tgsi_context *bld_base, unsigned index, LLVMValueRef dst[4]); -/* Combine these with & instead of |. */ -#define NOOP_WAITCNT 0xf7f -#define LGKM_CNT 0x07f -#define VM_CNT 0xf70 - LLVMValueRef si_get_indirect_index(struct si_shader_context *ctx, const struct tgsi_ind_register *ind, unsigned addr_mul, int rel_index); -- 2.30.2