[Mesa-dev] [PATCH] radeon/llvm: Adapt to AMDGPU.rsq intrinsic change in LLVM 3.5

2014-06-19 Thread Michel Dänzer
From: Michel Dänzer michel.daen...@amd.com

Signed-off-by: Michel Dänzer michel.daen...@amd.com
---
 src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c 
b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
index f8be0df..217fa32 100644
--- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
+++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
@@ -1384,7 +1384,11 @@ void radeon_llvm_context_init(struct radeon_llvm_context 
* ctx)
bld_base-op_actions[TGSI_OPCODE_UCMP].emit = emit_ucmp;
 
bld_base-rsq_action.emit = build_tgsi_intrinsic_nomem;
+#if HAVE_LLVM = 0x0305
+   bld_base-rsq_action.intr_name = llvm.AMDGPU.rsq.;
+#else
bld_base-rsq_action.intr_name = llvm.AMDGPU.rsq;
+#endif
 }
 
 void radeon_llvm_create_func(struct radeon_llvm_context * ctx,
-- 
2.0.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] radeon/llvm: Adapt to AMDGPU.rsq intrinsic change in LLVM 3.5

2014-06-19 Thread Matt Arsenault

On Jun 18, 2014, at 11:53 PM, Michel Dänzer mic...@daenzer.net wrote:

 From: Michel Dänzer michel.daen...@amd.com
 
 Signed-off-by: Michel Dänzer michel.daen...@amd.com
 ---
 src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 4 
 1 file changed, 4 insertions(+)
 
 diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c 
 b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
 index f8be0df..217fa32 100644
 --- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
 +++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
 @@ -1384,7 +1384,11 @@ void radeon_llvm_context_init(struct 
 radeon_llvm_context * ctx)
   bld_base-op_actions[TGSI_OPCODE_UCMP].emit = emit_ucmp;
 
   bld_base-rsq_action.emit = build_tgsi_intrinsic_nomem;
 +#if HAVE_LLVM = 0x0305
 + bld_base-rsq_action.intr_name = llvm.AMDGPU.rsq.;
 +#else
   bld_base-rsq_action.intr_name = llvm.AMDGPU.rsq;
 +#endif
 }
 
 void radeon_llvm_create_func(struct radeon_llvm_context * ctx,
 -- 
 2.0.0
 
 ___
 mesa-dev mailing list
 mesa-dev@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/mesa-dev

While you’re at it, could you fix the old AMDIL intrinsics too?

I don’t think these have been updated yet (although the old names still 
technically work)

llvm.AMDIL.abs - llvm.AMDGPU.abs
llvm.AMDIL.clamp - llvm.AMDGPU.clamp
llvm.AMDIL.fraction - llvm.AMDGPU.fract
llvm.AMDIL.exp - llvm.exp2
llvm.AMDIL.round.nearest - llvm.rint
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] radeon/llvm: Adapt to AMDGPU.rsq intrinsic change in LLVM 3.5

2014-06-19 Thread Tom Stellard
On Thu, Jun 19, 2014 at 03:53:42PM +0900, Michel Dänzer wrote:
 From: Michel Dänzer michel.daen...@amd.com
 

I just pushed this patch to fix the regressions.  We can update the
other intrinsics in a follow on patch.

We also need to change RSQ to use llvm.AMDGPU.rsq.clamped once
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140616/80.html
is committed in order to fix
https://bugs.freedesktop.org/show_bug.cgi?id=80015

Also, I forgot to do this before I committed it, but I think this patch
should go to stable.

-Tom

 Signed-off-by: Michel Dänzer michel.daen...@amd.com
 ---
  src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c | 4 
  1 file changed, 4 insertions(+)
 
 diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c 
 b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
 index f8be0df..217fa32 100644
 --- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
 +++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
 @@ -1384,7 +1384,11 @@ void radeon_llvm_context_init(struct 
 radeon_llvm_context * ctx)
   bld_base-op_actions[TGSI_OPCODE_UCMP].emit = emit_ucmp;
  
   bld_base-rsq_action.emit = build_tgsi_intrinsic_nomem;
 +#if HAVE_LLVM = 0x0305
 + bld_base-rsq_action.intr_name = llvm.AMDGPU.rsq.;
 +#else
   bld_base-rsq_action.intr_name = llvm.AMDGPU.rsq;
 +#endif
  }
  
  void radeon_llvm_create_func(struct radeon_llvm_context * ctx,
 -- 
 2.0.0
 
 ___
 mesa-dev mailing list
 mesa-dev@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev