Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-12 Thread Nicolai Hähnle
On 12.10.2016 01:49, Tom Stellard wrote: On Tue, Oct 11, 2016 at 03:21:24PM +0200, Nicolai Hähnle wrote: On 11.10.2016 07:36, Dave Airlie wrote: On 11 October 2016 at 12:13, Dave Airlie wrote: On 11 October 2016 at 11:42, Dave Airlie wrote: On 11 October 2016 at 05:50, Dave Airlie wrote:

Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-11 Thread Arsenault, Matthew
Why does the IR need access to the scratch pointer at all? I don't understand what problems the explicit IR argument is supposed to solve or why an intrinsic would be needed. The value is only needed for lowering the access to scratch, the user program shouldn't need to be aware it exists O

Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-11 Thread Tom Stellard
On Tue, Oct 11, 2016 at 03:21:24PM +0200, Nicolai Hähnle wrote: > On 11.10.2016 07:36, Dave Airlie wrote: > > On 11 October 2016 at 12:13, Dave Airlie wrote: > >> On 11 October 2016 at 11:42, Dave Airlie wrote: > >>> On 11 October 2016 at 05:50, Dave Airlie wrote: > On 10 October 2016 at 21

Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-11 Thread Bas Nieuwenhuizen
On Tue, Oct 11, 2016 at 11:14 PM, Bas Nieuwenhuizen wrote: > On Tue, Oct 11, 2016 at 2:42 AM, Dave Airlie wrote: >> On 11 October 2016 at 05:50, Dave Airlie wrote: >>> On 10 October 2016 at 21:45, Arsenault, Matthew >>> wrote: I don't like adding explicit IR arguments for ABI arguments, es

Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-11 Thread Bas Nieuwenhuizen
On Tue, Oct 11, 2016 at 2:42 AM, Dave Airlie wrote: > On 11 October 2016 at 05:50, Dave Airlie wrote: >> On 10 October 2016 at 21:45, Arsenault, Matthew >> wrote: >>> I don't like adding explicit IR arguments for ABI arguments, especially this >>> one. Adding a special case for the first index f

Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-11 Thread Nicolai Hähnle
On 11.10.2016 16:36, Arsenault, Matthew wrote: Why does the IR need access to the scratch pointer at all? I don't understand what problems the explicit IR argument is supposed to solve or why an intrinsic would be needed. The value is only needed for lowering the access to scratch, the user progr

Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-11 Thread Nicolai Hähnle
On 11.10.2016 15:21, Nicolai Hähnle wrote: On 11.10.2016 07:36, Dave Airlie wrote: On 11 October 2016 at 12:13, Dave Airlie wrote: On 11 October 2016 at 11:42, Dave Airlie wrote: On 11 October 2016 at 05:50, Dave Airlie wrote: On 10 October 2016 at 21:45, Arsenault, Matthew wrote: I don'

Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-11 Thread Nicolai Hähnle
On 11.10.2016 07:36, Dave Airlie wrote: On 11 October 2016 at 12:13, Dave Airlie wrote: On 11 October 2016 at 11:42, Dave Airlie wrote: On 11 October 2016 at 05:50, Dave Airlie wrote: On 10 October 2016 at 21:45, Arsenault, Matthew wrote: I don't like adding explicit IR arguments for ABI

Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-10 Thread Dave Airlie
On 11 October 2016 at 12:13, Dave Airlie wrote: > On 11 October 2016 at 11:42, Dave Airlie wrote: >> On 11 October 2016 at 05:50, Dave Airlie wrote: >>> On 10 October 2016 at 21:45, Arsenault, Matthew >>> wrote: I don't like adding explicit IR arguments for ABI arguments, especially

Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-10 Thread Dave Airlie
On 11 October 2016 at 11:42, Dave Airlie wrote: > On 11 October 2016 at 05:50, Dave Airlie wrote: >> On 10 October 2016 at 21:45, Arsenault, Matthew >> wrote: >>> I don't like adding explicit IR arguments for ABI arguments, especially this >>> one. Adding a special case for the first index feels

Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-10 Thread Dave Airlie
On 11 October 2016 at 05:50, Dave Airlie wrote: > On 10 October 2016 at 21:45, Arsenault, Matthew > wrote: >> I don't like adding explicit IR arguments for ABI arguments, especially this >> one. Adding a special case for the first index feels dirty. The rest of llvm >> also won't be aware of the

Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-10 Thread Arsenault, Matthew
t and then codegen would have to fail in some way when the argument is missing _ From: Nicolai Hähnle mailto:nhaeh...@gmail.com>> Sent: Monday, October 10, 2016 16:07 Subject: Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling. To: Ar

Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-10 Thread Dave Airlie
On 10 October 2016 at 21:45, Arsenault, Matthew wrote: > I don't like adding explicit IR arguments for ABI arguments, especially this > one. Adding a special case for the first index feels dirty. The rest of llvm > also won't be aware of the specialness of the argument. It would be > problematic b

Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-10 Thread Marek Olšák
I'd like the scratch buffer to be the first descriptor in RW_BUFFERS, that means s_load_dwordx2 ptr, s[0:1], 0x0. Please don't add any other user data SGPRs to radeonsi. Marek On Mon, Oct 10, 2016 at 10:06 AM, Nicolai Hähnle wrote: > On 10.10.2016 05:45, Dave Airlie wrote: >> >> On 10 October 2

Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-10 Thread Nicolai Hähnle
On 10.10.2016 05:45, Dave Airlie wrote: On 10 October 2016 at 13:25, Dave Airlie wrote: From: Dave Airlie This is a bit of a hack due to how llvm currently handles spilling in it's shader ABI. Currently llvm amdgpu backend uses relocations to patch the shader with the address of the tmpring.

Re: [Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-09 Thread Dave Airlie
On 10 October 2016 at 13:25, Dave Airlie wrote: > From: Dave Airlie > > This is a bit of a hack due to how llvm currently handles > spilling in it's shader ABI. Currently llvm amdgpu backend > uses relocations to patch the shader with the address of > the tmpring. The driver loads the shader and

[Mesa-dev] [PATCH 2/2] [RFC] radv: add scratch support for spilling.

2016-10-09 Thread Dave Airlie
From: Dave Airlie This is a bit of a hack due to how llvm currently handles spilling in it's shader ABI. Currently llvm amdgpu backend uses relocations to patch the shader with the address of the tmpring. The driver loads the shader and patches the relocations. However for vulkan this doesn't wo