Re: [Mesa-dev] [PATCH v5 01/70] mesa: set MAX_SHADER_STORAGE_BUFFERS to 15.

2015-09-15 Thread Samuel Iglesias Gonsálvez


On 15/09/15 20:25, Kristian Høgsberg wrote:
> On Fri, Sep 11, 2015 at 08:12:13AM +0200, Iago Toral wrote:
>> On Thu, 2015-09-10 at 15:17 -0400, Ilia Mirkin wrote:
>>> On Thu, Sep 10, 2015 at 2:52 PM, Ian Romanick  wrote:
 On 09/10/2015 10:45 AM, Ilia Mirkin wrote:
> On Thu, Sep 10, 2015 at 9:35 AM, Iago Toral Quiroga  
> wrote:
>> From: Samuel Iglesias Gonsalvez 
>>
>> This patch sets the same value used for uniform buffers.
>>
>> Signed-off-by: Samuel Iglesias Gonsalvez 
>> ---
>>  src/mesa/main/config.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
>> index b35031d..69acd7d 100644
>> --- a/src/mesa/main/config.h
>> +++ b/src/mesa/main/config.h
>> @@ -171,7 +171,7 @@
>>  #define MAX_PROGRAM_LOCAL_PARAMS   4096
>>  #define MAX_UNIFORMS   4096
>>  #define MAX_UNIFORM_BUFFERS15 /* + 1 default uniform buffer 
>> */
>> -#define MAX_SHADER_STORAGE_BUFFERS 7  /* + 1 default shader storage 
>> buffer */
>> +#define MAX_SHADER_STORAGE_BUFFERS 15  /* + 1 default shader 
>> storage buffer */
>
> Is there such a thing as a default shader storage buffer? I would have
> assumed not, but haven't read the spec.

 Technically no, but I think (and I'm sure Ken will correct me) i965 uses
 one for register spilling.  Or is "scratch space" a different sort of 
 thing?
>>>
>>> Sure, but that's a driver-specific thing. The MAX_UNIFORM_BUFFERS
>>> thing is in reference to the number of uniform buffers in the GL.
>>> MAX_SHADER_STORAGE_BUFFERS seems like it should be the same thing. Why
>>> not make it 16? Or perhaps leave it at 15 and remove the comment?
>>
>> Right, this is used to define the maximum number of binding points
>> available per shader stage. There is no such thing as a default shader
>> storage buffer that is different from the others, I think that comment
>> is just a copy mistake. We can remove the comment and leave this
>> at 15, or round it up to 16 as you suggest. I'd go with the latter.
>>
>> Iago
> 
> Yes, there's nothing in our hardware that limits the number of SSBOs,
> except the ~256 total entries limit in the binding table.  I agree, go
> with 16 and drop the comment.
> 
> Reviewed-by: Kristian Høgsberg 
> 

OK, thanks!

Sam

>>> With uniform buffers, there's a "default" uniform buffer, and then
>>> there are actual user ones.
>>
>>
>>

>>  /* 6 is for vertex, hull, domain, geometry, fragment, and compute 
>> shader. */
>>  #define MAX_COMBINED_UNIFORM_BUFFERS   (MAX_UNIFORM_BUFFERS * 6)
>>  #define MAX_COMBINED_SHADER_STORAGE_BUFFERS   
>> (MAX_SHADER_STORAGE_BUFFERS * 6)
>> --
>> 1.9.1
>>
>> ___
>> 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

>>>
>>
>>
>> ___
>> 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
> 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v5 01/70] mesa: set MAX_SHADER_STORAGE_BUFFERS to 15.

2015-09-15 Thread Kristian Høgsberg
On Fri, Sep 11, 2015 at 08:12:13AM +0200, Iago Toral wrote:
> On Thu, 2015-09-10 at 15:17 -0400, Ilia Mirkin wrote:
> > On Thu, Sep 10, 2015 at 2:52 PM, Ian Romanick  wrote:
> > > On 09/10/2015 10:45 AM, Ilia Mirkin wrote:
> > >> On Thu, Sep 10, 2015 at 9:35 AM, Iago Toral Quiroga  
> > >> wrote:
> > >>> From: Samuel Iglesias Gonsalvez 
> > >>>
> > >>> This patch sets the same value used for uniform buffers.
> > >>>
> > >>> Signed-off-by: Samuel Iglesias Gonsalvez 
> > >>> ---
> > >>>  src/mesa/main/config.h | 2 +-
> > >>>  1 file changed, 1 insertion(+), 1 deletion(-)
> > >>>
> > >>> diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
> > >>> index b35031d..69acd7d 100644
> > >>> --- a/src/mesa/main/config.h
> > >>> +++ b/src/mesa/main/config.h
> > >>> @@ -171,7 +171,7 @@
> > >>>  #define MAX_PROGRAM_LOCAL_PARAMS   4096
> > >>>  #define MAX_UNIFORMS   4096
> > >>>  #define MAX_UNIFORM_BUFFERS15 /* + 1 default uniform 
> > >>> buffer */
> > >>> -#define MAX_SHADER_STORAGE_BUFFERS 7  /* + 1 default shader 
> > >>> storage buffer */
> > >>> +#define MAX_SHADER_STORAGE_BUFFERS 15  /* + 1 default shader 
> > >>> storage buffer */
> > >>
> > >> Is there such a thing as a default shader storage buffer? I would have
> > >> assumed not, but haven't read the spec.
> > >
> > > Technically no, but I think (and I'm sure Ken will correct me) i965 uses
> > > one for register spilling.  Or is "scratch space" a different sort of 
> > > thing?
> > 
> > Sure, but that's a driver-specific thing. The MAX_UNIFORM_BUFFERS
> > thing is in reference to the number of uniform buffers in the GL.
> > MAX_SHADER_STORAGE_BUFFERS seems like it should be the same thing. Why
> > not make it 16? Or perhaps leave it at 15 and remove the comment?
> 
> Right, this is used to define the maximum number of binding points
> available per shader stage. There is no such thing as a default shader
> storage buffer that is different from the others, I think that comment
> is just a copy mistake. We can remove the comment and leave this
> at 15, or round it up to 16 as you suggest. I'd go with the latter.
> 
> Iago

Yes, there's nothing in our hardware that limits the number of SSBOs,
except the ~256 total entries limit in the binding table.  I agree, go
with 16 and drop the comment.

Reviewed-by: Kristian Høgsberg 

> > With uniform buffers, there's a "default" uniform buffer, and then
> > there are actual user ones.
> 
> 
> 
> > >
> > >>>  /* 6 is for vertex, hull, domain, geometry, fragment, and compute 
> > >>> shader. */
> > >>>  #define MAX_COMBINED_UNIFORM_BUFFERS   (MAX_UNIFORM_BUFFERS * 6)
> > >>>  #define MAX_COMBINED_SHADER_STORAGE_BUFFERS   
> > >>> (MAX_SHADER_STORAGE_BUFFERS * 6)
> > >>> --
> > >>> 1.9.1
> > >>>
> > >>> ___
> > >>> 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
> > >
> > 
> 
> 
> ___
> 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


Re: [Mesa-dev] [PATCH v5 01/70] mesa: set MAX_SHADER_STORAGE_BUFFERS to 15.

2015-09-11 Thread Iago Toral
On Thu, 2015-09-10 at 15:17 -0400, Ilia Mirkin wrote:
> On Thu, Sep 10, 2015 at 2:52 PM, Ian Romanick  wrote:
> > On 09/10/2015 10:45 AM, Ilia Mirkin wrote:
> >> On Thu, Sep 10, 2015 at 9:35 AM, Iago Toral Quiroga  
> >> wrote:
> >>> From: Samuel Iglesias Gonsalvez 
> >>>
> >>> This patch sets the same value used for uniform buffers.
> >>>
> >>> Signed-off-by: Samuel Iglesias Gonsalvez 
> >>> ---
> >>>  src/mesa/main/config.h | 2 +-
> >>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
> >>> index b35031d..69acd7d 100644
> >>> --- a/src/mesa/main/config.h
> >>> +++ b/src/mesa/main/config.h
> >>> @@ -171,7 +171,7 @@
> >>>  #define MAX_PROGRAM_LOCAL_PARAMS   4096
> >>>  #define MAX_UNIFORMS   4096
> >>>  #define MAX_UNIFORM_BUFFERS15 /* + 1 default uniform buffer 
> >>> */
> >>> -#define MAX_SHADER_STORAGE_BUFFERS 7  /* + 1 default shader storage 
> >>> buffer */
> >>> +#define MAX_SHADER_STORAGE_BUFFERS 15  /* + 1 default shader storage 
> >>> buffer */
> >>
> >> Is there such a thing as a default shader storage buffer? I would have
> >> assumed not, but haven't read the spec.
> >
> > Technically no, but I think (and I'm sure Ken will correct me) i965 uses
> > one for register spilling.  Or is "scratch space" a different sort of thing?
> 
> Sure, but that's a driver-specific thing. The MAX_UNIFORM_BUFFERS
> thing is in reference to the number of uniform buffers in the GL.
> MAX_SHADER_STORAGE_BUFFERS seems like it should be the same thing. Why
> not make it 16? Or perhaps leave it at 15 and remove the comment?

Right, this is used to define the maximum number of binding points
available per shader stage. There is no such thing as a default shader
storage buffer that is different from the others, I think that comment
is just a copy mistake. We can remove the comment and leave this
at 15, or round it up to 16 as you suggest. I'd go with the latter.

Iago

> With uniform buffers, there's a "default" uniform buffer, and then
> there are actual user ones.



> >
> >>>  /* 6 is for vertex, hull, domain, geometry, fragment, and compute 
> >>> shader. */
> >>>  #define MAX_COMBINED_UNIFORM_BUFFERS   (MAX_UNIFORM_BUFFERS * 6)
> >>>  #define MAX_COMBINED_SHADER_STORAGE_BUFFERS   
> >>> (MAX_SHADER_STORAGE_BUFFERS * 6)
> >>> --
> >>> 1.9.1
> >>>
> >>> ___
> >>> 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
> >
> 


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


Re: [Mesa-dev] [PATCH v5 01/70] mesa: set MAX_SHADER_STORAGE_BUFFERS to 15.

2015-09-10 Thread Ian Romanick
On 09/10/2015 10:45 AM, Ilia Mirkin wrote:
> On Thu, Sep 10, 2015 at 9:35 AM, Iago Toral Quiroga  wrote:
>> From: Samuel Iglesias Gonsalvez 
>>
>> This patch sets the same value used for uniform buffers.
>>
>> Signed-off-by: Samuel Iglesias Gonsalvez 
>> ---
>>  src/mesa/main/config.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
>> index b35031d..69acd7d 100644
>> --- a/src/mesa/main/config.h
>> +++ b/src/mesa/main/config.h
>> @@ -171,7 +171,7 @@
>>  #define MAX_PROGRAM_LOCAL_PARAMS   4096
>>  #define MAX_UNIFORMS   4096
>>  #define MAX_UNIFORM_BUFFERS15 /* + 1 default uniform buffer */
>> -#define MAX_SHADER_STORAGE_BUFFERS 7  /* + 1 default shader storage 
>> buffer */
>> +#define MAX_SHADER_STORAGE_BUFFERS 15  /* + 1 default shader storage 
>> buffer */
> 
> Is there such a thing as a default shader storage buffer? I would have
> assumed not, but haven't read the spec.

Technically no, but I think (and I'm sure Ken will correct me) i965 uses
one for register spilling.  Or is "scratch space" a different sort of thing?

>>  /* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */
>>  #define MAX_COMBINED_UNIFORM_BUFFERS   (MAX_UNIFORM_BUFFERS * 6)
>>  #define MAX_COMBINED_SHADER_STORAGE_BUFFERS   (MAX_SHADER_STORAGE_BUFFERS * 
>> 6)
>> --
>> 1.9.1
>>
>> ___
>> 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

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


Re: [Mesa-dev] [PATCH v5 01/70] mesa: set MAX_SHADER_STORAGE_BUFFERS to 15.

2015-09-10 Thread Ilia Mirkin
On Thu, Sep 10, 2015 at 9:35 AM, Iago Toral Quiroga  wrote:
> From: Samuel Iglesias Gonsalvez 
>
> This patch sets the same value used for uniform buffers.
>
> Signed-off-by: Samuel Iglesias Gonsalvez 
> ---
>  src/mesa/main/config.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
> index b35031d..69acd7d 100644
> --- a/src/mesa/main/config.h
> +++ b/src/mesa/main/config.h
> @@ -171,7 +171,7 @@
>  #define MAX_PROGRAM_LOCAL_PARAMS   4096
>  #define MAX_UNIFORMS   4096
>  #define MAX_UNIFORM_BUFFERS15 /* + 1 default uniform buffer */
> -#define MAX_SHADER_STORAGE_BUFFERS 7  /* + 1 default shader storage 
> buffer */
> +#define MAX_SHADER_STORAGE_BUFFERS 15  /* + 1 default shader storage 
> buffer */

Is there such a thing as a default shader storage buffer? I would have
assumed not, but haven't read the spec.

>  /* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */
>  #define MAX_COMBINED_UNIFORM_BUFFERS   (MAX_UNIFORM_BUFFERS * 6)
>  #define MAX_COMBINED_SHADER_STORAGE_BUFFERS   (MAX_SHADER_STORAGE_BUFFERS * 
> 6)
> --
> 1.9.1
>
> ___
> 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


Re: [Mesa-dev] [PATCH v5 01/70] mesa: set MAX_SHADER_STORAGE_BUFFERS to 15.

2015-09-10 Thread Ilia Mirkin
On Thu, Sep 10, 2015 at 2:52 PM, Ian Romanick  wrote:
> On 09/10/2015 10:45 AM, Ilia Mirkin wrote:
>> On Thu, Sep 10, 2015 at 9:35 AM, Iago Toral Quiroga  
>> wrote:
>>> From: Samuel Iglesias Gonsalvez 
>>>
>>> This patch sets the same value used for uniform buffers.
>>>
>>> Signed-off-by: Samuel Iglesias Gonsalvez 
>>> ---
>>>  src/mesa/main/config.h | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
>>> index b35031d..69acd7d 100644
>>> --- a/src/mesa/main/config.h
>>> +++ b/src/mesa/main/config.h
>>> @@ -171,7 +171,7 @@
>>>  #define MAX_PROGRAM_LOCAL_PARAMS   4096
>>>  #define MAX_UNIFORMS   4096
>>>  #define MAX_UNIFORM_BUFFERS15 /* + 1 default uniform buffer */
>>> -#define MAX_SHADER_STORAGE_BUFFERS 7  /* + 1 default shader storage 
>>> buffer */
>>> +#define MAX_SHADER_STORAGE_BUFFERS 15  /* + 1 default shader storage 
>>> buffer */
>>
>> Is there such a thing as a default shader storage buffer? I would have
>> assumed not, but haven't read the spec.
>
> Technically no, but I think (and I'm sure Ken will correct me) i965 uses
> one for register spilling.  Or is "scratch space" a different sort of thing?

Sure, but that's a driver-specific thing. The MAX_UNIFORM_BUFFERS
thing is in reference to the number of uniform buffers in the GL.
MAX_SHADER_STORAGE_BUFFERS seems like it should be the same thing. Why
not make it 16? Or perhaps leave it at 15 and remove the comment?

With uniform buffers, there's a "default" uniform buffer, and then
there are actual user ones.

>
>>>  /* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. 
>>> */
>>>  #define MAX_COMBINED_UNIFORM_BUFFERS   (MAX_UNIFORM_BUFFERS * 6)
>>>  #define MAX_COMBINED_SHADER_STORAGE_BUFFERS   (MAX_SHADER_STORAGE_BUFFERS 
>>> * 6)
>>> --
>>> 1.9.1
>>>
>>> ___
>>> 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
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v5 01/70] mesa: set MAX_SHADER_STORAGE_BUFFERS to 15.

2015-09-10 Thread Jordan Justen
Reviewed-by: Jordan Justen 

On 2015-09-10 06:35:17, Iago Toral Quiroga wrote:
> From: Samuel Iglesias Gonsalvez 
> 
> This patch sets the same value used for uniform buffers.
> 
> Signed-off-by: Samuel Iglesias Gonsalvez 
> ---
>  src/mesa/main/config.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
> index b35031d..69acd7d 100644
> --- a/src/mesa/main/config.h
> +++ b/src/mesa/main/config.h
> @@ -171,7 +171,7 @@
>  #define MAX_PROGRAM_LOCAL_PARAMS   4096
>  #define MAX_UNIFORMS   4096
>  #define MAX_UNIFORM_BUFFERS15 /* + 1 default uniform buffer */
> -#define MAX_SHADER_STORAGE_BUFFERS 7  /* + 1 default shader storage 
> buffer */
> +#define MAX_SHADER_STORAGE_BUFFERS 15  /* + 1 default shader storage 
> buffer */
>  /* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */
>  #define MAX_COMBINED_UNIFORM_BUFFERS   (MAX_UNIFORM_BUFFERS * 6)
>  #define MAX_COMBINED_SHADER_STORAGE_BUFFERS   (MAX_SHADER_STORAGE_BUFFERS * 
> 6)
> -- 
> 1.9.1
> 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev