Re: [Mesa-dev] [PATCH 1/3] st/mesa: fix handling of NumSamples=1

2017-08-03 Thread Ilia Mirkin
On Thu, Aug 3, 2017 at 3:12 PM, Marek Olšák wrote: > I'm OK with the patch. I think most drivers support nr_samples of 0 > and 1, which have the same behavior. That's definitely true for nouveau, in fact we've gone to some lengths to support nr_samples == 1... > > Reviewed-by: Marek Olšák > > M

Re: [Mesa-dev] [PATCH 1/3] st/mesa: fix handling of NumSamples=1

2017-08-03 Thread Marek Olšák
I'm OK with the patch. I think most drivers support nr_samples of 0 and 1, which have the same behavior. Reviewed-by: Marek Olšák Marek On Wed, Aug 2, 2017 at 7:07 PM, Brian Paul wrote: > We pretty much use the convention that if gl_renderbuffer::NumSamples > or gl_texture_image::NumSamples is

Re: [Mesa-dev] [PATCH 1/3] st/mesa: fix handling of NumSamples=1

2017-08-02 Thread Brian Paul
Yes, I'm not proposing otherwise. -Brian On 08/02/2017 03:53 PM, Marek Olšák wrote: Can the issue be fixed such that gallium drivers keep getting nr_samples = 0? Marek On Wed, Aug 2, 2017 at 7:07 PM, Brian Paul wrote: We pretty much use the convention that if gl_renderbuffer::NumSamples or

Re: [Mesa-dev] [PATCH 1/3] st/mesa: fix handling of NumSamples=1

2017-08-02 Thread Marek Olšák
Can the issue be fixed such that gallium drivers keep getting nr_samples = 0? Marek On Wed, Aug 2, 2017 at 7:07 PM, Brian Paul wrote: > We pretty much use the convention that if gl_renderbuffer::NumSamples > or gl_texture_image::NumSamples is zero, it's a non-MSAA surface. > Otherwise, it's an M

Re: [Mesa-dev] [PATCH 1/3] st/mesa: fix handling of NumSamples=1

2017-08-02 Thread Roland Scheidegger
Am 02.08.2017 um 21:49 schrieb Brian Paul: > On 08/02/2017 01:18 PM, Roland Scheidegger wrote: >> Am 02.08.2017 um 20:35 schrieb Brian Paul: >>> On 08/02/2017 11:59 AM, Roland Scheidegger wrote: I think the problem here is that msaa surfaces with sample count 1 are not really supposed to

Re: [Mesa-dev] [PATCH 1/3] st/mesa: fix handling of NumSamples=1

2017-08-02 Thread Brian Paul
On 08/02/2017 01:18 PM, Roland Scheidegger wrote: Am 02.08.2017 um 20:35 schrieb Brian Paul: On 08/02/2017 11:59 AM, Roland Scheidegger wrote: I think the problem here is that msaa surfaces with sample count 1 are not really supposed to exist in gallium. This is a rather awkward gl-ism, which i

Re: [Mesa-dev] [PATCH 1/3] st/mesa: fix handling of NumSamples=1

2017-08-02 Thread Roland Scheidegger
Am 02.08.2017 um 20:35 schrieb Brian Paul: > On 08/02/2017 11:59 AM, Roland Scheidegger wrote: >> I think the problem here is that msaa surfaces with sample count 1 are >> not really supposed to exist in gallium. >> This is a rather awkward gl-ism, which isn't possible anywhere else, >> other apis

Re: [Mesa-dev] [PATCH 1/3] st/mesa: fix handling of NumSamples=1

2017-08-02 Thread Brian Paul
On 08/02/2017 11:59 AM, Roland Scheidegger wrote: I think the problem here is that msaa surfaces with sample count 1 are not really supposed to exist in gallium. This is a rather awkward gl-ism, which isn't possible anywhere else, other apis have no distinction between a multisampled surface with

Re: [Mesa-dev] [PATCH 1/3] st/mesa: fix handling of NumSamples=1

2017-08-02 Thread Roland Scheidegger
I think the problem here is that msaa surfaces with sample count 1 are not really supposed to exist in gallium. This is a rather awkward gl-ism, which isn't possible anywhere else, other apis have no distinction between a multisampled surface with sample count 1 and a non-multisampled surface with

[Mesa-dev] [PATCH 1/3] st/mesa: fix handling of NumSamples=1

2017-08-02 Thread Brian Paul
We pretty much use the convention that if gl_renderbuffer::NumSamples or gl_texture_image::NumSamples is zero, it's a non-MSAA surface. Otherwise, it's an MSAA surface. This patch changes the sample count checks in st_AllocTextureStorage() and st_renderbuffer_alloc_storage() to test for samples >