Re: [Mesa-dev] [PATCH] R600/SI: allow 4 more input SGPRs to a shader

2014-04-29 Thread Christian König
Also, I think it would be a good idea to add the maximum possible number or registers to the calling convention (i.e. the number or register we would use if all inputs are enabled and all user sgprs are being used). Well that's what we did previously, unfortunately it wasn't adopted when we add

Re: [Mesa-dev] [PATCH] R600/SI: allow 4 more input SGPRs to a shader

2014-04-28 Thread Tom Stellard
On Mon, Apr 28, 2014 at 08:27:07PM +0200, Marek Olšák wrote: > Please see my Mesa patch which moves index_bias to an SGPR. Doing it > conditionally would be messy. > An alternative solution would be to give the function a target specific calling convention and then create and implement that calli

Re: [Mesa-dev] [PATCH] R600/SI: allow 4 more input SGPRs to a shader

2014-04-28 Thread Marek Olšák
Please see my Mesa patch which moves index_bias to an SGPR. Doing it conditionally would be messy. Marek On Mon, Apr 28, 2014 at 11:40 AM, Michel Dänzer wrote: > On 26.04.2014 22:36, Marek Olšák wrote: >> From: Marek Olšák >> >> Mesa needs one more SGPR, let's add 5 then, because it's a recurri

Re: [Mesa-dev] [PATCH] R600/SI: allow 4 more input SGPRs to a shader

2014-04-28 Thread Michel Dänzer
On 26.04.2014 22:36, Marek Olšák wrote: > From: Marek Olšák > > Mesa needs one more SGPR, let's add 5 then, because it's a recurring issue. > > This is silly. Why cannot Mesa specify the calling convention? > Now I have to break transform feedback to support ARB_draw_indirect until > this patch

Re: [Mesa-dev] [PATCH] R600/SI: allow 4 more input SGPRs to a shader

2014-04-26 Thread Christian König
Ah! Didn't took streamout into account, than that makes indeed sense. On the other hand every SGPR load at shader start means quite a penalty, so we should try to avoid loading so many of them. We sooner or later probably need a more dynamical allocation for them. Christian. Am 26.04.2014 1

Re: [Mesa-dev] [PATCH] R600/SI: allow 4 more input SGPRs to a shader

2014-04-26 Thread Marek Olšák
No, the user SGPRs are within the limit, but there are other SGPRs loaded by the hardware. For example, streamout needs up to 6 SGPRs but none of them are "user". This patch is actually correct, because it allows 16 user SGPRs and 6 non-user SGPRs. Marek On Sat, Apr 26, 2014 at 4:06 PM, Christian

Re: [Mesa-dev] [PATCH] R600/SI: allow 4 more input SGPRs to a shader

2014-04-26 Thread Christian König
That won't work correctly, the hardware can only load a maximum of 16 user SGPRs at shader initialization. If we need more we need to pass the data through an extra buffer or something like that. Christian. Am 26.04.2014 15:37, schrieb Marek Olšák: Sorry, the subject should say "5 more input

Re: [Mesa-dev] [PATCH] R600/SI: allow 4 more input SGPRs to a shader

2014-04-26 Thread Marek Olšák
Sorry, the subject should say "5 more input SGPRs". Marek On Sat, Apr 26, 2014 at 3:36 PM, Marek Olšák wrote: > From: Marek Olšák > > Mesa needs one more SGPR, let's add 5 then, because it's a recurring issue. > > This is silly. Why cannot Mesa specify the calling convention? > Now I have to br

[Mesa-dev] [PATCH] R600/SI: allow 4 more input SGPRs to a shader

2014-04-26 Thread Marek Olšák
From: Marek Olšák Mesa needs one more SGPR, let's add 5 then, because it's a recurring issue. This is silly. Why cannot Mesa specify the calling convention? Now I have to break transform feedback to support ARB_draw_indirect until this patch is released. Or I'll have to wait until the release an