Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-20 Thread Samuel Pitoiset
On 04/20/2017 07:47 PM, Nicolai Hähnle wrote: On 20.04.2017 16:54, Samuel Pitoiset wrote: [snip] Yes, contains_opaque() not is_opaque(). Well, how do you plan to handle the fact that bindless sampler types are 64-bit? It seemed quite logical to make glsl_type::is_64bit() returns true for

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-20 Thread Nicolai Hähnle
On 20.04.2017 16:54, Samuel Pitoiset wrote: [snip] Yes, contains_opaque() not is_opaque(). Well, how do you plan to handle the fact that bindless sampler types are 64-bit? It seemed quite logical to make glsl_type::is_64bit() returns true for them. So, for the purposes of src/compiler/glsl/, I

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-20 Thread Samuel Pitoiset
On 04/20/2017 12:47 AM, Samuel Pitoiset wrote: On 04/19/2017 11:14 AM, Nicolai Hähnle wrote: On 19.04.2017 09:51, Samuel Pitoiset wrote: On 04/18/2017 11:26 PM, Nicolai Hähnle wrote: On 18.04.2017 21:49, Dave Airlie wrote: On 19 April 2017 at 05:30, Samuel Pitoiset

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-19 Thread Samuel Pitoiset
On 04/19/2017 11:14 AM, Nicolai Hähnle wrote: On 19.04.2017 09:51, Samuel Pitoiset wrote: On 04/18/2017 11:26 PM, Nicolai Hähnle wrote: On 18.04.2017 21:49, Dave Airlie wrote: On 19 April 2017 at 05:30, Samuel Pitoiset wrote: On 04/18/2017 08:14 PM, Nicolai

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-19 Thread Samuel Pitoiset
On 04/19/2017 03:23 PM, Ilia Mirkin wrote: On Wed, Apr 19, 2017 at 5:47 AM, Nicolai Hähnle wrote: By the way, this is also how Ilia's example would be implemented. When inlined, it could become something like: layout (bound_sampler) uniform sampler2D u_tex; in

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-19 Thread Ilia Mirkin
On Wed, Apr 19, 2017 at 5:47 AM, Nicolai Hähnle wrote: > By the way, this is also how Ilia's example would be implemented. When > inlined, it could become something like: > > layout (bound_sampler) uniform sampler2D u_tex; > in sampler2D in_tex; > > void main() > { >

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-19 Thread Nicolai Hähnle
On 19.04.2017 11:09, Nicolai Hähnle wrote: At least I haven't seen anything in the spec to contradict that. Side note: As far as I can tell, you're even allowed to do: layout (bound_sampler) uniform sampler2D tex; ... uvec2 handle = uvec2(tex); I think this is correct as well, at

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-19 Thread Nicolai Hähnle
On 19.04.2017 09:51, Samuel Pitoiset wrote: On 04/18/2017 11:26 PM, Nicolai Hähnle wrote: On 18.04.2017 21:49, Dave Airlie wrote: On 19 April 2017 at 05:30, Samuel Pitoiset wrote: On 04/18/2017 08:14 PM, Nicolai Hähnle wrote: On 11.04.2017 18:48, Samuel

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-19 Thread Nicolai Hähnle
On 19.04.2017 10:10, Samuel Pitoiset wrote: On 04/19/2017 08:40 AM, Nicolai Hähnle wrote: On 19.04.2017 00:01, Ilia Mirkin wrote: On Tue, Apr 18, 2017 at 5:26 PM, Nicolai Hähnle wrote: On 18.04.2017 21:49, Dave Airlie wrote: On 19 April 2017 at 05:30, Samuel Pitoiset

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-19 Thread Samuel Pitoiset
On 04/19/2017 08:40 AM, Nicolai Hähnle wrote: On 19.04.2017 00:01, Ilia Mirkin wrote: On Tue, Apr 18, 2017 at 5:26 PM, Nicolai Hähnle wrote: On 18.04.2017 21:49, Dave Airlie wrote: On 19 April 2017 at 05:30, Samuel Pitoiset wrote: On

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-19 Thread Samuel Pitoiset
On 04/18/2017 11:26 PM, Nicolai Hähnle wrote: On 18.04.2017 21:49, Dave Airlie wrote: On 19 April 2017 at 05:30, Samuel Pitoiset wrote: On 04/18/2017 08:14 PM, Nicolai Hähnle wrote: On 11.04.2017 18:48, Samuel Pitoiset wrote: Bindless sampler/image types are

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-19 Thread Nicolai Hähnle
On 19.04.2017 00:01, Ilia Mirkin wrote: On Tue, Apr 18, 2017 at 5:26 PM, Nicolai Hähnle wrote: On 18.04.2017 21:49, Dave Airlie wrote: On 19 April 2017 at 05:30, Samuel Pitoiset wrote: On 04/18/2017 08:14 PM, Nicolai Hähnle wrote: On

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-18 Thread Ilia Mirkin
On Tue, Apr 18, 2017 at 5:26 PM, Nicolai Hähnle wrote: > On 18.04.2017 21:49, Dave Airlie wrote: >> >> On 19 April 2017 at 05:30, Samuel Pitoiset >> wrote: >>> >>> >>> >>> On 04/18/2017 08:14 PM, Nicolai Hähnle wrote: On 11.04.2017

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-18 Thread Nicolai Hähnle
On 18.04.2017 21:49, Dave Airlie wrote: On 19 April 2017 at 05:30, Samuel Pitoiset wrote: On 04/18/2017 08:14 PM, Nicolai Hähnle wrote: On 11.04.2017 18:48, Samuel Pitoiset wrote: Bindless sampler/image types are really different from the existing sampler/image

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-18 Thread Dave Airlie
On 19 April 2017 at 05:30, Samuel Pitoiset wrote: > > > On 04/18/2017 08:14 PM, Nicolai Hähnle wrote: >> >> On 11.04.2017 18:48, Samuel Pitoiset wrote: >>> >>> Bindless sampler/image types are really different from the existing >>> sampler/image types. They are

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-18 Thread Samuel Pitoiset
On 04/18/2017 08:14 PM, Nicolai Hähnle wrote: On 11.04.2017 18:48, Samuel Pitoiset wrote: Bindless sampler/image types are really different from the existing sampler/image types. They are considered 64-bit unsigned integers, they can be declared as temporary, shader inputs/outputs and are

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-18 Thread Nicolai Hähnle
On 11.04.2017 18:48, Samuel Pitoiset wrote: Bindless sampler/image types are really different from the existing sampler/image types. They are considered 64-bit unsigned integers, they can be declared as temporary, shader inputs/outputs and are non-opaque types. For these reasons, it looks more

Re: [Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-11 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Tue, Apr 11, 2017 at 12:48 PM, Samuel Pitoiset wrote: > Bindless sampler/image types are really different from the existing > sampler/image types. They are considered 64-bit unsigned integers, > they can be declared as

[Mesa-dev] [RFC PATCH 03/26] glsl: introduce new base types for bindless samplers/images

2017-04-11 Thread Samuel Pitoiset
Bindless sampler/image types are really different from the existing sampler/image types. They are considered 64-bit unsigned integers, they can be declared as temporary, shader inputs/outputs and are non-opaque types. For these reasons, it looks more convenient to introduce new internal base