From 872b21487c9f4dee736586e309bb53155dc0e0ab Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Mon, 16 Oct 2017 22:15:47 +0200 Subject: ac/nir: Add HS calling convention. Needed for GFX9 merged shaders. Reviewed-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/amd/common') diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 3ba3ebf051e..1df97b59a2e 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -39,6 +39,7 @@ enum radeon_llvm_calling_convention { RADEON_LLVM_AMDGPU_GS = 88, RADEON_LLVM_AMDGPU_PS = 89, RADEON_LLVM_AMDGPU_CS = 90, + RADEON_LLVM_AMDGPU_HS = 93, }; #define CONST_ADDR_SPACE 2 @@ -223,13 +224,15 @@ static void set_llvm_calling_convention(LLVMValueRef func, switch (stage) { case MESA_SHADER_VERTEX: - case MESA_SHADER_TESS_CTRL: case MESA_SHADER_TESS_EVAL: calling_conv = RADEON_LLVM_AMDGPU_VS; break; case MESA_SHADER_GEOMETRY: calling_conv = RADEON_LLVM_AMDGPU_GS; break; + case MESA_SHADER_TESS_CTRL: + calling_conv = HAVE_LLVM >= 0x0500 ? RADEON_LLVM_AMDGPU_HS : RADEON_LLVM_AMDGPU_VS; + break; case MESA_SHADER_FRAGMENT: calling_conv = RADEON_LLVM_AMDGPU_PS; break; -- cgit v1.2.3