Re: [Mesa-dev] [PATCH] gallium: add CAP for postprocess filters

2018-04-04 Thread Marek Olšák
On Wed, Apr 4, 2018 at 10:30 AM, Roland Scheidegger 
wrote:

> Am 04.04.2018 um 05:42 schrieb Timothy Arceri:
> > On 04/04/18 13:22, Roland Scheidegger wrote:
> >> Am 04.04.2018 um 05:03 schrieb Timothy Arceri:
> >>> On 04/04/18 12:44, Roland Scheidegger wrote:
>  Am 04.04.2018 um 04:32 schrieb Timothy Arceri:
> > On 04/04/18 11:58, Roland Scheidegger wrote:
> >> AFAIK these filters (and I've never looked into them) should be
> >> transparent to hw drivers. Hence a cap bit doesn't make sense, and
> if
> >> it's broken we shouldn't just paper over this.
> >
> > I created a CAP because the AMD devs have no interest in supporting
> > this
> > feature [1]. Even if they are transparent to drivers I don't see why
> > drivers should be forced to enable them if they don't want to. CCing
> > Marek for his opinion.
> 
>  I still don't see why using cap bits for bugs is a good idea.
> >>>
> >>> Well I see it as a CAP for an unwanted feature that just happens to not
> >>> work currently.
> >>>
>  (Even more so if the bug actually would be in the postprocess, but
> I've
>  no idea there really.)
> >>>
> >>> It's crashing in src/gallium/drivers/radeonsi/si_state_draw.c
> >>
> >> Doesn't necessarily mean the bug is in the driver.
> >> Not sure it's really worth fixing it this way neither - people are
> >> probably just as confused why pp won't work than they are if it's
> >> crashing...
> >
> > Well I can either update the webpage to say its disabled for radeonsi or
> > I can close the bugs as won't fix and let people wonder why its crashing
> > potentially filling another bug report. The first bug was filed a year
> > ago and nobody seems to want to fix it. Either way I don't care to much
> > but disabling the feature seems like a better way to go than just
> > letting it crash forever.
>
> Alright, if the bug is that old I suppose there's really no interest in
> actually fixing it...
> So I suppose that would be an improvement...
>

I've just fixed it. The patches are on the ML.

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


Re: [Mesa-dev] [PATCH] gallium: add CAP for postprocess filters

2018-04-04 Thread Roland Scheidegger
Am 04.04.2018 um 05:42 schrieb Timothy Arceri:
> On 04/04/18 13:22, Roland Scheidegger wrote:
>> Am 04.04.2018 um 05:03 schrieb Timothy Arceri:
>>> On 04/04/18 12:44, Roland Scheidegger wrote:
 Am 04.04.2018 um 04:32 schrieb Timothy Arceri:
> On 04/04/18 11:58, Roland Scheidegger wrote:
>> AFAIK these filters (and I've never looked into them) should be
>> transparent to hw drivers. Hence a cap bit doesn't make sense, and if
>> it's broken we shouldn't just paper over this.
>
> I created a CAP because the AMD devs have no interest in supporting
> this
> feature [1]. Even if they are transparent to drivers I don't see why
> drivers should be forced to enable them if they don't want to. CCing
> Marek for his opinion.

 I still don't see why using cap bits for bugs is a good idea.
>>>
>>> Well I see it as a CAP for an unwanted feature that just happens to not
>>> work currently.
>>>
 (Even more so if the bug actually would be in the postprocess, but I've
 no idea there really.)
>>>
>>> It's crashing in src/gallium/drivers/radeonsi/si_state_draw.c
>>
>> Doesn't necessarily mean the bug is in the driver.
>> Not sure it's really worth fixing it this way neither - people are
>> probably just as confused why pp won't work than they are if it's
>> crashing...
> 
> Well I can either update the webpage to say its disabled for radeonsi or
> I can close the bugs as won't fix and let people wonder why its crashing
> potentially filling another bug report. The first bug was filed a year
> ago and nobody seems to want to fix it. Either way I don't care to much
> but disabling the feature seems like a better way to go than just
> letting it crash forever.

Alright, if the bug is that old I suppose there's really no interest in
actually fixing it...
So I suppose that would be an improvement...

Roland


>>
>>
>> Roland
>>
>>>

 Roland

>
> [1]
> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D99549-23c3=DwICaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=s23eRwsegKslN9P2JpzYmfnEOt7uPtVLO6XI3-BR_h4=LnLvs_TtyuJE3MWrA16CVWgkwxKkfKCuXHJDbtO3KGo=
>
>
>
>
>>
>> Roland
>>
>> Am 03.04.2018 um 13:38 schrieb Timothy Arceri:
>>> For radeonsi these seem to have been somewhat broken for over a
>>> year, and as of recently they cause the driver to crash.
>>>
>>> This patch adds a CAP for the filters and enables the CAP for all
>>> driver except radeonsi.
>>>
>>> Bugzilla:
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D99549=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=5iJ7ErqsBvMPRH06U44_GD_7EvtIFP8hzyKeeDtIxxE=
>>>
>>>
>>>
>>> Bugzilla:
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D105026=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=PeI7pgvz9cprwPELTcdw_TUZHrtj1tt6KjHa-4rVRtY=
>>>
>>>
>>>
>>> ---
>>>     src/gallium/docs/source/screen.rst   |  2 ++
>>>     src/gallium/drivers/etnaviv/etnaviv_screen.c |  1 +
>>>     src/gallium/drivers/freedreno/freedreno_screen.c |  1 +
>>>     src/gallium/drivers/i915/i915_screen.c   |  1 +
>>>     src/gallium/drivers/llvmpipe/lp_screen.c |  1 +
>>>     src/gallium/drivers/nouveau/nv30/nv30_screen.c   |  1 +
>>>     src/gallium/drivers/nouveau/nv50/nv50_screen.c   |  1 +
>>>     src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   |  1 +
>>>     src/gallium/drivers/r300/r300_screen.c   |  1 +
>>>     src/gallium/drivers/r600/r600_pipe.c |  1 +
>>>     src/gallium/drivers/radeonsi/si_get.c    |  1 +
>>>     src/gallium/drivers/softpipe/sp_screen.c |  1 +
>>>     src/gallium/drivers/svga/svga_screen.c   |  1 +
>>>     src/gallium/drivers/swr/swr_screen.cpp   |  1 +
>>>     src/gallium/drivers/vc4/vc4_screen.c |  1 +
>>>     src/gallium/drivers/vc5/vc5_screen.c |  1 +
>>>     src/gallium/drivers/virgl/virgl_screen.c |  2 ++
>>>     src/gallium/include/pipe/p_defines.h |  1 +
>>>     src/gallium/state_trackers/dri/dri_screen.c  | 15
>>> ---
>>>     19 files changed, 28 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/src/gallium/docs/source/screen.rst
>>> b/src/gallium/docs/source/screen.rst
>>> index 3837360fb40..22aba928580 100644
>>> --- a/src/gallium/docs/source/screen.rst
>>> +++ b/src/gallium/docs/source/screen.rst
>>> @@ -420,6 +420,8 @@ The integer capabilities:
>>>   by the driver, and the driver can throw assertion failures.
>>>     * 

Re: [Mesa-dev] [PATCH] gallium: add CAP for postprocess filters

2018-04-03 Thread Timothy Arceri

On 04/04/18 13:22, Roland Scheidegger wrote:

Am 04.04.2018 um 05:03 schrieb Timothy Arceri:

On 04/04/18 12:44, Roland Scheidegger wrote:

Am 04.04.2018 um 04:32 schrieb Timothy Arceri:

On 04/04/18 11:58, Roland Scheidegger wrote:

AFAIK these filters (and I've never looked into them) should be
transparent to hw drivers. Hence a cap bit doesn't make sense, and if
it's broken we shouldn't just paper over this.


I created a CAP because the AMD devs have no interest in supporting this
feature [1]. Even if they are transparent to drivers I don't see why
drivers should be forced to enable them if they don't want to. CCing
Marek for his opinion.


I still don't see why using cap bits for bugs is a good idea.


Well I see it as a CAP for an unwanted feature that just happens to not
work currently.


(Even more so if the bug actually would be in the postprocess, but I've
no idea there really.)


It's crashing in src/gallium/drivers/radeonsi/si_state_draw.c


Doesn't necessarily mean the bug is in the driver.
Not sure it's really worth fixing it this way neither - people are
probably just as confused why pp won't work than they are if it's
crashing...


Well I can either update the webpage to say its disabled for radeonsi or 
I can close the bugs as won't fix and let people wonder why its crashing 
potentially filling another bug report. The first bug was filed a year 
ago and nobody seems to want to fix it. Either way I don't care to much 
but disabling the feature seems like a better way to go than just 
letting it crash forever.





Roland





Roland



[1]
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D99549-23c3=DwICaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=s23eRwsegKslN9P2JpzYmfnEOt7uPtVLO6XI3-BR_h4=LnLvs_TtyuJE3MWrA16CVWgkwxKkfKCuXHJDbtO3KGo=





Roland

Am 03.04.2018 um 13:38 schrieb Timothy Arceri:

For radeonsi these seem to have been somewhat broken for over a
year, and as of recently they cause the driver to crash.

This patch adds a CAP for the filters and enables the CAP for all
driver except radeonsi.

Bugzilla:
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D99549=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=5iJ7ErqsBvMPRH06U44_GD_7EvtIFP8hzyKeeDtIxxE=


Bugzilla:
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D105026=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=PeI7pgvz9cprwPELTcdw_TUZHrtj1tt6KjHa-4rVRtY=


---
    src/gallium/docs/source/screen.rst   |  2 ++
    src/gallium/drivers/etnaviv/etnaviv_screen.c |  1 +
    src/gallium/drivers/freedreno/freedreno_screen.c |  1 +
    src/gallium/drivers/i915/i915_screen.c   |  1 +
    src/gallium/drivers/llvmpipe/lp_screen.c |  1 +
    src/gallium/drivers/nouveau/nv30/nv30_screen.c   |  1 +
    src/gallium/drivers/nouveau/nv50/nv50_screen.c   |  1 +
    src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   |  1 +
    src/gallium/drivers/r300/r300_screen.c   |  1 +
    src/gallium/drivers/r600/r600_pipe.c |  1 +
    src/gallium/drivers/radeonsi/si_get.c    |  1 +
    src/gallium/drivers/softpipe/sp_screen.c |  1 +
    src/gallium/drivers/svga/svga_screen.c   |  1 +
    src/gallium/drivers/swr/swr_screen.cpp   |  1 +
    src/gallium/drivers/vc4/vc4_screen.c |  1 +
    src/gallium/drivers/vc5/vc5_screen.c |  1 +
    src/gallium/drivers/virgl/virgl_screen.c |  2 ++
    src/gallium/include/pipe/p_defines.h |  1 +
    src/gallium/state_trackers/dri/dri_screen.c  | 15
---
    19 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/src/gallium/docs/source/screen.rst
b/src/gallium/docs/source/screen.rst
index 3837360fb40..22aba928580 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -420,6 +420,8 @@ The integer capabilities:
  by the driver, and the driver can throw assertion failures.
    * ``PIPE_CAP_PACKED_UNIFORMS``: True if the driver supports packed
uniforms
  as opposed to padding to vec4s.
+* ``PIPE_CAP_PP_FILTERS``: True if the driver supports the
postprocess filters
+  available in gallium.
        .. _pipe_capf:
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c
b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index 2ae4e86c631..d277ac834db 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -140,6 +140,7 @@ etna_screen_get_param(struct pipe_screen
*pscreen, enum pipe_cap param)
   case PIPE_CAP_TGSI_TEXCOORD:
   case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
   case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
+   case PIPE_CAP_PP_FILTERS:
  return 1;
   case 

Re: [Mesa-dev] [PATCH] gallium: add CAP for postprocess filters

2018-04-03 Thread Roland Scheidegger
Am 04.04.2018 um 05:03 schrieb Timothy Arceri:
> On 04/04/18 12:44, Roland Scheidegger wrote:
>> Am 04.04.2018 um 04:32 schrieb Timothy Arceri:
>>> On 04/04/18 11:58, Roland Scheidegger wrote:
 AFAIK these filters (and I've never looked into them) should be
 transparent to hw drivers. Hence a cap bit doesn't make sense, and if
 it's broken we shouldn't just paper over this.
>>>
>>> I created a CAP because the AMD devs have no interest in supporting this
>>> feature [1]. Even if they are transparent to drivers I don't see why
>>> drivers should be forced to enable them if they don't want to. CCing
>>> Marek for his opinion.
>>
>> I still don't see why using cap bits for bugs is a good idea.
> 
> Well I see it as a CAP for an unwanted feature that just happens to not
> work currently.
> 
>> (Even more so if the bug actually would be in the postprocess, but I've
>> no idea there really.)
> 
> It's crashing in src/gallium/drivers/radeonsi/si_state_draw.c

Doesn't necessarily mean the bug is in the driver.
Not sure it's really worth fixing it this way neither - people are
probably just as confused why pp won't work than they are if it's
crashing...


Roland

> 
>>
>> Roland
>>
>>>
>>> [1]
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D99549-23c3=DwICaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=s23eRwsegKslN9P2JpzYmfnEOt7uPtVLO6XI3-BR_h4=LnLvs_TtyuJE3MWrA16CVWgkwxKkfKCuXHJDbtO3KGo=
>>>
>>>
>>>

 Roland

 Am 03.04.2018 um 13:38 schrieb Timothy Arceri:
> For radeonsi these seem to have been somewhat broken for over a
> year, and as of recently they cause the driver to crash.
>
> This patch adds a CAP for the filters and enables the CAP for all
> driver except radeonsi.
>
> Bugzilla:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D99549=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=5iJ7ErqsBvMPRH06U44_GD_7EvtIFP8hzyKeeDtIxxE=
>
>
> Bugzilla:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D105026=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=PeI7pgvz9cprwPELTcdw_TUZHrtj1tt6KjHa-4rVRtY=
>
>
> ---
>    src/gallium/docs/source/screen.rst   |  2 ++
>    src/gallium/drivers/etnaviv/etnaviv_screen.c |  1 +
>    src/gallium/drivers/freedreno/freedreno_screen.c |  1 +
>    src/gallium/drivers/i915/i915_screen.c   |  1 +
>    src/gallium/drivers/llvmpipe/lp_screen.c |  1 +
>    src/gallium/drivers/nouveau/nv30/nv30_screen.c   |  1 +
>    src/gallium/drivers/nouveau/nv50/nv50_screen.c   |  1 +
>    src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   |  1 +
>    src/gallium/drivers/r300/r300_screen.c   |  1 +
>    src/gallium/drivers/r600/r600_pipe.c |  1 +
>    src/gallium/drivers/radeonsi/si_get.c    |  1 +
>    src/gallium/drivers/softpipe/sp_screen.c |  1 +
>    src/gallium/drivers/svga/svga_screen.c   |  1 +
>    src/gallium/drivers/swr/swr_screen.cpp   |  1 +
>    src/gallium/drivers/vc4/vc4_screen.c |  1 +
>    src/gallium/drivers/vc5/vc5_screen.c |  1 +
>    src/gallium/drivers/virgl/virgl_screen.c |  2 ++
>    src/gallium/include/pipe/p_defines.h |  1 +
>    src/gallium/state_trackers/dri/dri_screen.c  | 15
> ---
>    19 files changed, 28 insertions(+), 7 deletions(-)
>
> diff --git a/src/gallium/docs/source/screen.rst
> b/src/gallium/docs/source/screen.rst
> index 3837360fb40..22aba928580 100644
> --- a/src/gallium/docs/source/screen.rst
> +++ b/src/gallium/docs/source/screen.rst
> @@ -420,6 +420,8 @@ The integer capabilities:
>  by the driver, and the driver can throw assertion failures.
>    * ``PIPE_CAP_PACKED_UNIFORMS``: True if the driver supports packed
> uniforms
>  as opposed to padding to vec4s.
> +* ``PIPE_CAP_PP_FILTERS``: True if the driver supports the
> postprocess filters
> +  available in gallium.
>        .. _pipe_capf:
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c
> b/src/gallium/drivers/etnaviv/etnaviv_screen.c
> index 2ae4e86c631..d277ac834db 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
> @@ -140,6 +140,7 @@ etna_screen_get_param(struct pipe_screen
> *pscreen, enum pipe_cap param)
>   case PIPE_CAP_TGSI_TEXCOORD:
>   case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
>   case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
> +   case PIPE_CAP_PP_FILTERS:
>  return 1;
>   case 

Re: [Mesa-dev] [PATCH] gallium: add CAP for postprocess filters

2018-04-03 Thread Timothy Arceri

On 04/04/18 12:44, Roland Scheidegger wrote:

Am 04.04.2018 um 04:32 schrieb Timothy Arceri:

On 04/04/18 11:58, Roland Scheidegger wrote:

AFAIK these filters (and I've never looked into them) should be
transparent to hw drivers. Hence a cap bit doesn't make sense, and if
it's broken we shouldn't just paper over this.


I created a CAP because the AMD devs have no interest in supporting this
feature [1]. Even if they are transparent to drivers I don't see why
drivers should be forced to enable them if they don't want to. CCing
Marek for his opinion.


I still don't see why using cap bits for bugs is a good idea.


Well I see it as a CAP for an unwanted feature that just happens to not 
work currently.



(Even more so if the bug actually would be in the postprocess, but I've
no idea there really.)


It's crashing in src/gallium/drivers/radeonsi/si_state_draw.c



Roland



[1]
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D99549-23c3=DwICaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=s23eRwsegKslN9P2JpzYmfnEOt7uPtVLO6XI3-BR_h4=LnLvs_TtyuJE3MWrA16CVWgkwxKkfKCuXHJDbtO3KGo=




Roland

Am 03.04.2018 um 13:38 schrieb Timothy Arceri:

For radeonsi these seem to have been somewhat broken for over a
year, and as of recently they cause the driver to crash.

This patch adds a CAP for the filters and enables the CAP for all
driver except radeonsi.

Bugzilla:
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D99549=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=5iJ7ErqsBvMPRH06U44_GD_7EvtIFP8hzyKeeDtIxxE=

Bugzilla:
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D105026=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=PeI7pgvz9cprwPELTcdw_TUZHrtj1tt6KjHa-4rVRtY=

---
   src/gallium/docs/source/screen.rst   |  2 ++
   src/gallium/drivers/etnaviv/etnaviv_screen.c |  1 +
   src/gallium/drivers/freedreno/freedreno_screen.c |  1 +
   src/gallium/drivers/i915/i915_screen.c   |  1 +
   src/gallium/drivers/llvmpipe/lp_screen.c |  1 +
   src/gallium/drivers/nouveau/nv30/nv30_screen.c   |  1 +
   src/gallium/drivers/nouveau/nv50/nv50_screen.c   |  1 +
   src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   |  1 +
   src/gallium/drivers/r300/r300_screen.c   |  1 +
   src/gallium/drivers/r600/r600_pipe.c |  1 +
   src/gallium/drivers/radeonsi/si_get.c    |  1 +
   src/gallium/drivers/softpipe/sp_screen.c |  1 +
   src/gallium/drivers/svga/svga_screen.c   |  1 +
   src/gallium/drivers/swr/swr_screen.cpp   |  1 +
   src/gallium/drivers/vc4/vc4_screen.c |  1 +
   src/gallium/drivers/vc5/vc5_screen.c |  1 +
   src/gallium/drivers/virgl/virgl_screen.c |  2 ++
   src/gallium/include/pipe/p_defines.h |  1 +
   src/gallium/state_trackers/dri/dri_screen.c  | 15 ---
   19 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/src/gallium/docs/source/screen.rst
b/src/gallium/docs/source/screen.rst
index 3837360fb40..22aba928580 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -420,6 +420,8 @@ The integer capabilities:
     by the driver, and the driver can throw assertion failures.
   * ``PIPE_CAP_PACKED_UNIFORMS``: True if the driver supports packed
uniforms
     as opposed to padding to vec4s.
+* ``PIPE_CAP_PP_FILTERS``: True if the driver supports the
postprocess filters
+  available in gallium.
       .. _pipe_capf:
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c
b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index 2ae4e86c631..d277ac834db 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -140,6 +140,7 @@ etna_screen_get_param(struct pipe_screen
*pscreen, enum pipe_cap param)
  case PIPE_CAP_TGSI_TEXCOORD:
  case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
  case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
+   case PIPE_CAP_PP_FILTERS:
     return 1;
  case PIPE_CAP_NATIVE_FENCE_FD:
     return screen->drm_version >= ETNA_DRM_VERSION_FENCE_FD;
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c
b/src/gallium/drivers/freedreno/freedreno_screen.c
index f338d756dfe..42ab87514d8 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -186,6 +186,7 @@ fd_screen_get_param(struct pipe_screen *pscreen,
enum pipe_cap param)
   case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
   case PIPE_CAP_TEXTURE_BARRIER:
   case PIPE_CAP_INVALIDATE_BUFFER:
+    case PIPE_CAP_PP_FILTERS:
   return 1;
     case PIPE_CAP_VERTEXID_NOBASE:
diff --git a/src/gallium/drivers/i915/i915_screen.c

Re: [Mesa-dev] [PATCH] gallium: add CAP for postprocess filters

2018-04-03 Thread Roland Scheidegger
Am 04.04.2018 um 04:32 schrieb Timothy Arceri:
> On 04/04/18 11:58, Roland Scheidegger wrote:
>> AFAIK these filters (and I've never looked into them) should be
>> transparent to hw drivers. Hence a cap bit doesn't make sense, and if
>> it's broken we shouldn't just paper over this.
> 
> I created a CAP because the AMD devs have no interest in supporting this
> feature [1]. Even if they are transparent to drivers I don't see why
> drivers should be forced to enable them if they don't want to. CCing
> Marek for his opinion.

I still don't see why using cap bits for bugs is a good idea.
(Even more so if the bug actually would be in the postprocess, but I've
no idea there really.)

Roland

> 
> [1]
> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D99549-23c3=DwICaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=s23eRwsegKslN9P2JpzYmfnEOt7uPtVLO6XI3-BR_h4=LnLvs_TtyuJE3MWrA16CVWgkwxKkfKCuXHJDbtO3KGo=
> 
> 
>>
>> Roland
>>
>> Am 03.04.2018 um 13:38 schrieb Timothy Arceri:
>>> For radeonsi these seem to have been somewhat broken for over a
>>> year, and as of recently they cause the driver to crash.
>>>
>>> This patch adds a CAP for the filters and enables the CAP for all
>>> driver except radeonsi.
>>>
>>> Bugzilla:
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D99549=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=5iJ7ErqsBvMPRH06U44_GD_7EvtIFP8hzyKeeDtIxxE=
>>>
>>> Bugzilla:
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D105026=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=PeI7pgvz9cprwPELTcdw_TUZHrtj1tt6KjHa-4rVRtY=
>>>
>>> ---
>>>   src/gallium/docs/source/screen.rst   |  2 ++
>>>   src/gallium/drivers/etnaviv/etnaviv_screen.c |  1 +
>>>   src/gallium/drivers/freedreno/freedreno_screen.c |  1 +
>>>   src/gallium/drivers/i915/i915_screen.c   |  1 +
>>>   src/gallium/drivers/llvmpipe/lp_screen.c |  1 +
>>>   src/gallium/drivers/nouveau/nv30/nv30_screen.c   |  1 +
>>>   src/gallium/drivers/nouveau/nv50/nv50_screen.c   |  1 +
>>>   src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   |  1 +
>>>   src/gallium/drivers/r300/r300_screen.c   |  1 +
>>>   src/gallium/drivers/r600/r600_pipe.c |  1 +
>>>   src/gallium/drivers/radeonsi/si_get.c    |  1 +
>>>   src/gallium/drivers/softpipe/sp_screen.c |  1 +
>>>   src/gallium/drivers/svga/svga_screen.c   |  1 +
>>>   src/gallium/drivers/swr/swr_screen.cpp   |  1 +
>>>   src/gallium/drivers/vc4/vc4_screen.c |  1 +
>>>   src/gallium/drivers/vc5/vc5_screen.c |  1 +
>>>   src/gallium/drivers/virgl/virgl_screen.c |  2 ++
>>>   src/gallium/include/pipe/p_defines.h |  1 +
>>>   src/gallium/state_trackers/dri/dri_screen.c  | 15 ---
>>>   19 files changed, 28 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/src/gallium/docs/source/screen.rst
>>> b/src/gallium/docs/source/screen.rst
>>> index 3837360fb40..22aba928580 100644
>>> --- a/src/gallium/docs/source/screen.rst
>>> +++ b/src/gallium/docs/source/screen.rst
>>> @@ -420,6 +420,8 @@ The integer capabilities:
>>>     by the driver, and the driver can throw assertion failures.
>>>   * ``PIPE_CAP_PACKED_UNIFORMS``: True if the driver supports packed
>>> uniforms
>>>     as opposed to padding to vec4s.
>>> +* ``PIPE_CAP_PP_FILTERS``: True if the driver supports the
>>> postprocess filters
>>> +  available in gallium.
>>>       .. _pipe_capf:
>>> diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c
>>> b/src/gallium/drivers/etnaviv/etnaviv_screen.c
>>> index 2ae4e86c631..d277ac834db 100644
>>> --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
>>> +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
>>> @@ -140,6 +140,7 @@ etna_screen_get_param(struct pipe_screen
>>> *pscreen, enum pipe_cap param)
>>>  case PIPE_CAP_TGSI_TEXCOORD:
>>>  case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
>>>  case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
>>> +   case PIPE_CAP_PP_FILTERS:
>>>     return 1;
>>>  case PIPE_CAP_NATIVE_FENCE_FD:
>>>     return screen->drm_version >= ETNA_DRM_VERSION_FENCE_FD;
>>> diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c
>>> b/src/gallium/drivers/freedreno/freedreno_screen.c
>>> index f338d756dfe..42ab87514d8 100644
>>> --- a/src/gallium/drivers/freedreno/freedreno_screen.c
>>> +++ b/src/gallium/drivers/freedreno/freedreno_screen.c
>>> @@ -186,6 +186,7 @@ fd_screen_get_param(struct pipe_screen *pscreen,
>>> enum pipe_cap param)
>>>   case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
>>>   case PIPE_CAP_TEXTURE_BARRIER:
>>>   case PIPE_CAP_INVALIDATE_BUFFER:
>>> +    case PIPE_CAP_PP_FILTERS:
>>>   return 1;
>>>     case 

Re: [Mesa-dev] [PATCH] gallium: add CAP for postprocess filters

2018-04-03 Thread Marek Olšák
On Tue, Apr 3, 2018, 10:32 PM Timothy Arceri  wrote:

> On 04/04/18 11:58, Roland Scheidegger wrote:
> > AFAIK these filters (and I've never looked into them) should be
> > transparent to hw drivers. Hence a cap bit doesn't make sense, and if
> > it's broken we shouldn't just paper over this.
>
> I created a CAP because the AMD devs have no interest in supporting this
> feature [1]. Even if they are transparent to drivers I don't see why
> drivers should be forced to enable them if they don't want to. CCing
> Marek for his opinion.
>
> [1] https://bugs.freedesktop.org/show_bug.cgi?id=99549#c3


As long as it's just a crash and not a hang, it doesn't matter much. I
don't think anybody is using pp, though it's a trap for curious users for
sure.

Marek



>
> >
> > Roland
> >
> > Am 03.04.2018 um 13:38 schrieb Timothy Arceri:
> >> For radeonsi these seem to have been somewhat broken for over a
> >> year, and as of recently they cause the driver to crash.
> >>
> >> This patch adds a CAP for the filters and enables the CAP for all
> >> driver except radeonsi.
> >>
> >> Bugzilla:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D99549=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=5iJ7ErqsBvMPRH06U44_GD_7EvtIFP8hzyKeeDtIxxE=
> >> Bugzilla:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D105026=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=PeI7pgvz9cprwPELTcdw_TUZHrtj1tt6KjHa-4rVRtY=
> >> ---
> >>   src/gallium/docs/source/screen.rst   |  2 ++
> >>   src/gallium/drivers/etnaviv/etnaviv_screen.c |  1 +
> >>   src/gallium/drivers/freedreno/freedreno_screen.c |  1 +
> >>   src/gallium/drivers/i915/i915_screen.c   |  1 +
> >>   src/gallium/drivers/llvmpipe/lp_screen.c |  1 +
> >>   src/gallium/drivers/nouveau/nv30/nv30_screen.c   |  1 +
> >>   src/gallium/drivers/nouveau/nv50/nv50_screen.c   |  1 +
> >>   src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   |  1 +
> >>   src/gallium/drivers/r300/r300_screen.c   |  1 +
> >>   src/gallium/drivers/r600/r600_pipe.c |  1 +
> >>   src/gallium/drivers/radeonsi/si_get.c|  1 +
> >>   src/gallium/drivers/softpipe/sp_screen.c |  1 +
> >>   src/gallium/drivers/svga/svga_screen.c   |  1 +
> >>   src/gallium/drivers/swr/swr_screen.cpp   |  1 +
> >>   src/gallium/drivers/vc4/vc4_screen.c |  1 +
> >>   src/gallium/drivers/vc5/vc5_screen.c |  1 +
> >>   src/gallium/drivers/virgl/virgl_screen.c |  2 ++
> >>   src/gallium/include/pipe/p_defines.h |  1 +
> >>   src/gallium/state_trackers/dri/dri_screen.c  | 15 ---
> >>   19 files changed, 28 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/src/gallium/docs/source/screen.rst
> b/src/gallium/docs/source/screen.rst
> >> index 3837360fb40..22aba928580 100644
> >> --- a/src/gallium/docs/source/screen.rst
> >> +++ b/src/gallium/docs/source/screen.rst
> >> @@ -420,6 +420,8 @@ The integer capabilities:
> >> by the driver, and the driver can throw assertion failures.
> >>   * ``PIPE_CAP_PACKED_UNIFORMS``: True if the driver supports packed
> uniforms
> >> as opposed to padding to vec4s.
> >> +* ``PIPE_CAP_PP_FILTERS``: True if the driver supports the postprocess
> filters
> >> +  available in gallium.
> >>
> >>
> >>   .. _pipe_capf:
> >> diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c
> b/src/gallium/drivers/etnaviv/etnaviv_screen.c
> >> index 2ae4e86c631..d277ac834db 100644
> >> --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
> >> +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
> >> @@ -140,6 +140,7 @@ etna_screen_get_param(struct pipe_screen *pscreen,
> enum pipe_cap param)
> >>  case PIPE_CAP_TGSI_TEXCOORD:
> >>  case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
> >>  case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
> >> +   case PIPE_CAP_PP_FILTERS:
> >> return 1;
> >>  case PIPE_CAP_NATIVE_FENCE_FD:
> >> return screen->drm_version >= ETNA_DRM_VERSION_FENCE_FD;
> >> diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c
> b/src/gallium/drivers/freedreno/freedreno_screen.c
> >> index f338d756dfe..42ab87514d8 100644
> >> --- a/src/gallium/drivers/freedreno/freedreno_screen.c
> >> +++ b/src/gallium/drivers/freedreno/freedreno_screen.c
> >> @@ -186,6 +186,7 @@ fd_screen_get_param(struct pipe_screen *pscreen,
> enum pipe_cap param)
> >>  case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
> >>  case PIPE_CAP_TEXTURE_BARRIER:
> >>  case PIPE_CAP_INVALIDATE_BUFFER:
> >> +case PIPE_CAP_PP_FILTERS:
> >>  return 1;
> >>
> >>  case PIPE_CAP_VERTEXID_NOBASE:
> >> diff --git a/src/gallium/drivers/i915/i915_screen.c
> b/src/gallium/drivers/i915/i915_screen.c
> >> index 59d2ec66284..8564a8567e4 

Re: [Mesa-dev] [PATCH] gallium: add CAP for postprocess filters

2018-04-03 Thread Timothy Arceri

On 04/04/18 12:32, Timothy Arceri wrote:

On 04/04/18 11:58, Roland Scheidegger wrote:

AFAIK these filters (and I've never looked into them) should be
transparent to hw drivers. Hence a cap bit doesn't make sense, and if
it's broken we shouldn't just paper over this.


Also just to be clear these are crashing inside radeonsi not in any 
generic gallium code.




I created a CAP because the AMD devs have no interest in supporting this 
feature [1]. Even if they are transparent to drivers I don't see why 
drivers should be forced to enable them if they don't want to. CCing 
Marek for his opinion.


[1] https://bugs.freedesktop.org/show_bug.cgi?id=99549#c3



Roland

Am 03.04.2018 um 13:38 schrieb Timothy Arceri:

For radeonsi these seem to have been somewhat broken for over a
year, and as of recently they cause the driver to crash.

This patch adds a CAP for the filters and enables the CAP for all
driver except radeonsi.

Bugzilla: 
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D99549=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=5iJ7ErqsBvMPRH06U44_GD_7EvtIFP8hzyKeeDtIxxE= 

Bugzilla: 
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D105026=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=PeI7pgvz9cprwPELTcdw_TUZHrtj1tt6KjHa-4rVRtY= 


---
  src/gallium/docs/source/screen.rst   |  2 ++
  src/gallium/drivers/etnaviv/etnaviv_screen.c |  1 +
  src/gallium/drivers/freedreno/freedreno_screen.c |  1 +
  src/gallium/drivers/i915/i915_screen.c   |  1 +
  src/gallium/drivers/llvmpipe/lp_screen.c |  1 +
  src/gallium/drivers/nouveau/nv30/nv30_screen.c   |  1 +
  src/gallium/drivers/nouveau/nv50/nv50_screen.c   |  1 +
  src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   |  1 +
  src/gallium/drivers/r300/r300_screen.c   |  1 +
  src/gallium/drivers/r600/r600_pipe.c |  1 +
  src/gallium/drivers/radeonsi/si_get.c    |  1 +
  src/gallium/drivers/softpipe/sp_screen.c |  1 +
  src/gallium/drivers/svga/svga_screen.c   |  1 +
  src/gallium/drivers/swr/swr_screen.cpp   |  1 +
  src/gallium/drivers/vc4/vc4_screen.c |  1 +
  src/gallium/drivers/vc5/vc5_screen.c |  1 +
  src/gallium/drivers/virgl/virgl_screen.c |  2 ++
  src/gallium/include/pipe/p_defines.h |  1 +
  src/gallium/state_trackers/dri/dri_screen.c  | 15 ---
  19 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/src/gallium/docs/source/screen.rst 
b/src/gallium/docs/source/screen.rst

index 3837360fb40..22aba928580 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -420,6 +420,8 @@ The integer capabilities:
    by the driver, and the driver can throw assertion failures.
  * ``PIPE_CAP_PACKED_UNIFORMS``: True if the driver supports packed 
uniforms

    as opposed to padding to vec4s.
+* ``PIPE_CAP_PP_FILTERS``: True if the driver supports the 
postprocess filters

+  available in gallium.
  .. _pipe_capf:
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c 
b/src/gallium/drivers/etnaviv/etnaviv_screen.c

index 2ae4e86c631..d277ac834db 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -140,6 +140,7 @@ etna_screen_get_param(struct pipe_screen 
*pscreen, enum pipe_cap param)

 case PIPE_CAP_TGSI_TEXCOORD:
 case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
 case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
+   case PIPE_CAP_PP_FILTERS:
    return 1;
 case PIPE_CAP_NATIVE_FENCE_FD:
    return screen->drm_version >= ETNA_DRM_VERSION_FENCE_FD;
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c 
b/src/gallium/drivers/freedreno/freedreno_screen.c

index f338d756dfe..42ab87514d8 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -186,6 +186,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, 
enum pipe_cap param)

  case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
  case PIPE_CAP_TEXTURE_BARRIER:
  case PIPE_CAP_INVALIDATE_BUFFER:
+    case PIPE_CAP_PP_FILTERS:
  return 1;
  case PIPE_CAP_VERTEXID_NOBASE:
diff --git a/src/gallium/drivers/i915/i915_screen.c 
b/src/gallium/drivers/i915/i915_screen.c

index 59d2ec66284..8564a8567e4 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -205,6 +205,7 @@ i915_get_param(struct pipe_screen *screen, enum 
pipe_cap cap)

 case PIPE_CAP_VERTEX_COLOR_CLAMPED:
 case PIPE_CAP_USER_VERTEX_BUFFERS:
 case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
+   case PIPE_CAP_PP_FILTERS:
    return 1;
 /* Unsupported features (boolean caps). */
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c 

Re: [Mesa-dev] [PATCH] gallium: add CAP for postprocess filters

2018-04-03 Thread Timothy Arceri

On 04/04/18 11:58, Roland Scheidegger wrote:

AFAIK these filters (and I've never looked into them) should be
transparent to hw drivers. Hence a cap bit doesn't make sense, and if
it's broken we shouldn't just paper over this.


I created a CAP because the AMD devs have no interest in supporting this 
feature [1]. Even if they are transparent to drivers I don't see why 
drivers should be forced to enable them if they don't want to. CCing 
Marek for his opinion.


[1] https://bugs.freedesktop.org/show_bug.cgi?id=99549#c3



Roland

Am 03.04.2018 um 13:38 schrieb Timothy Arceri:

For radeonsi these seem to have been somewhat broken for over a
year, and as of recently they cause the driver to crash.

This patch adds a CAP for the filters and enables the CAP for all
driver except radeonsi.

Bugzilla: 
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D99549=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=5iJ7ErqsBvMPRH06U44_GD_7EvtIFP8hzyKeeDtIxxE=
Bugzilla: 
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D105026=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=PeI7pgvz9cprwPELTcdw_TUZHrtj1tt6KjHa-4rVRtY=
---
  src/gallium/docs/source/screen.rst   |  2 ++
  src/gallium/drivers/etnaviv/etnaviv_screen.c |  1 +
  src/gallium/drivers/freedreno/freedreno_screen.c |  1 +
  src/gallium/drivers/i915/i915_screen.c   |  1 +
  src/gallium/drivers/llvmpipe/lp_screen.c |  1 +
  src/gallium/drivers/nouveau/nv30/nv30_screen.c   |  1 +
  src/gallium/drivers/nouveau/nv50/nv50_screen.c   |  1 +
  src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   |  1 +
  src/gallium/drivers/r300/r300_screen.c   |  1 +
  src/gallium/drivers/r600/r600_pipe.c |  1 +
  src/gallium/drivers/radeonsi/si_get.c|  1 +
  src/gallium/drivers/softpipe/sp_screen.c |  1 +
  src/gallium/drivers/svga/svga_screen.c   |  1 +
  src/gallium/drivers/swr/swr_screen.cpp   |  1 +
  src/gallium/drivers/vc4/vc4_screen.c |  1 +
  src/gallium/drivers/vc5/vc5_screen.c |  1 +
  src/gallium/drivers/virgl/virgl_screen.c |  2 ++
  src/gallium/include/pipe/p_defines.h |  1 +
  src/gallium/state_trackers/dri/dri_screen.c  | 15 ---
  19 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/src/gallium/docs/source/screen.rst 
b/src/gallium/docs/source/screen.rst
index 3837360fb40..22aba928580 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -420,6 +420,8 @@ The integer capabilities:
by the driver, and the driver can throw assertion failures.
  * ``PIPE_CAP_PACKED_UNIFORMS``: True if the driver supports packed uniforms
as opposed to padding to vec4s.
+* ``PIPE_CAP_PP_FILTERS``: True if the driver supports the postprocess filters
+  available in gallium.
  
  
  .. _pipe_capf:

diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c 
b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index 2ae4e86c631..d277ac834db 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -140,6 +140,7 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
 case PIPE_CAP_TGSI_TEXCOORD:
 case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
 case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
+   case PIPE_CAP_PP_FILTERS:
return 1;
 case PIPE_CAP_NATIVE_FENCE_FD:
return screen->drm_version >= ETNA_DRM_VERSION_FENCE_FD;
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c 
b/src/gallium/drivers/freedreno/freedreno_screen.c
index f338d756dfe..42ab87514d8 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -186,6 +186,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
case PIPE_CAP_TEXTURE_BARRIER:
case PIPE_CAP_INVALIDATE_BUFFER:
+   case PIPE_CAP_PP_FILTERS:
return 1;
  
  	case PIPE_CAP_VERTEXID_NOBASE:

diff --git a/src/gallium/drivers/i915/i915_screen.c 
b/src/gallium/drivers/i915/i915_screen.c
index 59d2ec66284..8564a8567e4 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -205,6 +205,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap 
cap)
 case PIPE_CAP_VERTEX_COLOR_CLAMPED:
 case PIPE_CAP_USER_VERTEX_BUFFERS:
 case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
+   case PIPE_CAP_PP_FILTERS:
return 1;
  
 /* Unsupported features (boolean caps). */

diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c 
b/src/gallium/drivers/llvmpipe/lp_screen.c
index 3f5d0327bf9..9290d3ec869 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ 

Re: [Mesa-dev] [PATCH] gallium: add CAP for postprocess filters

2018-04-03 Thread Roland Scheidegger
AFAIK these filters (and I've never looked into them) should be
transparent to hw drivers. Hence a cap bit doesn't make sense, and if
it's broken we shouldn't just paper over this.

Roland

Am 03.04.2018 um 13:38 schrieb Timothy Arceri:
> For radeonsi these seem to have been somewhat broken for over a
> year, and as of recently they cause the driver to crash.
> 
> This patch adds a CAP for the filters and enables the CAP for all
> driver except radeonsi.
> 
> Bugzilla: 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D99549=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=5iJ7ErqsBvMPRH06U44_GD_7EvtIFP8hzyKeeDtIxxE=
> Bugzilla: 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D105026=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0=FsyE0Iv-1HkgmJ_6JgvnISAuUbjQthRX9OcSu3BUhgc=PeI7pgvz9cprwPELTcdw_TUZHrtj1tt6KjHa-4rVRtY=
> ---
>  src/gallium/docs/source/screen.rst   |  2 ++
>  src/gallium/drivers/etnaviv/etnaviv_screen.c |  1 +
>  src/gallium/drivers/freedreno/freedreno_screen.c |  1 +
>  src/gallium/drivers/i915/i915_screen.c   |  1 +
>  src/gallium/drivers/llvmpipe/lp_screen.c |  1 +
>  src/gallium/drivers/nouveau/nv30/nv30_screen.c   |  1 +
>  src/gallium/drivers/nouveau/nv50/nv50_screen.c   |  1 +
>  src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   |  1 +
>  src/gallium/drivers/r300/r300_screen.c   |  1 +
>  src/gallium/drivers/r600/r600_pipe.c |  1 +
>  src/gallium/drivers/radeonsi/si_get.c|  1 +
>  src/gallium/drivers/softpipe/sp_screen.c |  1 +
>  src/gallium/drivers/svga/svga_screen.c   |  1 +
>  src/gallium/drivers/swr/swr_screen.cpp   |  1 +
>  src/gallium/drivers/vc4/vc4_screen.c |  1 +
>  src/gallium/drivers/vc5/vc5_screen.c |  1 +
>  src/gallium/drivers/virgl/virgl_screen.c |  2 ++
>  src/gallium/include/pipe/p_defines.h |  1 +
>  src/gallium/state_trackers/dri/dri_screen.c  | 15 ---
>  19 files changed, 28 insertions(+), 7 deletions(-)
> 
> diff --git a/src/gallium/docs/source/screen.rst 
> b/src/gallium/docs/source/screen.rst
> index 3837360fb40..22aba928580 100644
> --- a/src/gallium/docs/source/screen.rst
> +++ b/src/gallium/docs/source/screen.rst
> @@ -420,6 +420,8 @@ The integer capabilities:
>by the driver, and the driver can throw assertion failures.
>  * ``PIPE_CAP_PACKED_UNIFORMS``: True if the driver supports packed uniforms
>as opposed to padding to vec4s.
> +* ``PIPE_CAP_PP_FILTERS``: True if the driver supports the postprocess 
> filters
> +  available in gallium.
>  
>  
>  .. _pipe_capf:
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c 
> b/src/gallium/drivers/etnaviv/etnaviv_screen.c
> index 2ae4e86c631..d277ac834db 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
> @@ -140,6 +140,7 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum 
> pipe_cap param)
> case PIPE_CAP_TGSI_TEXCOORD:
> case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
> case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
> +   case PIPE_CAP_PP_FILTERS:
>return 1;
> case PIPE_CAP_NATIVE_FENCE_FD:
>return screen->drm_version >= ETNA_DRM_VERSION_FENCE_FD;
> diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c 
> b/src/gallium/drivers/freedreno/freedreno_screen.c
> index f338d756dfe..42ab87514d8 100644
> --- a/src/gallium/drivers/freedreno/freedreno_screen.c
> +++ b/src/gallium/drivers/freedreno/freedreno_screen.c
> @@ -186,6 +186,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum 
> pipe_cap param)
>   case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
>   case PIPE_CAP_TEXTURE_BARRIER:
>   case PIPE_CAP_INVALIDATE_BUFFER:
> + case PIPE_CAP_PP_FILTERS:
>   return 1;
>  
>   case PIPE_CAP_VERTEXID_NOBASE:
> diff --git a/src/gallium/drivers/i915/i915_screen.c 
> b/src/gallium/drivers/i915/i915_screen.c
> index 59d2ec66284..8564a8567e4 100644
> --- a/src/gallium/drivers/i915/i915_screen.c
> +++ b/src/gallium/drivers/i915/i915_screen.c
> @@ -205,6 +205,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap 
> cap)
> case PIPE_CAP_VERTEX_COLOR_CLAMPED:
> case PIPE_CAP_USER_VERTEX_BUFFERS:
> case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
> +   case PIPE_CAP_PP_FILTERS:
>return 1;
>  
> /* Unsupported features (boolean caps). */
> diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c 
> b/src/gallium/drivers/llvmpipe/lp_screen.c
> index 3f5d0327bf9..9290d3ec869 100644
> --- a/src/gallium/drivers/llvmpipe/lp_screen.c
> +++ b/src/gallium/drivers/llvmpipe/lp_screen.c
> @@ -110,6 +110,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum 
> pipe_cap param)
> case PIPE_CAP_NPOT_TEXTURES:
> case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
>   

[Mesa-dev] [PATCH] gallium: add CAP for postprocess filters

2018-04-03 Thread Timothy Arceri
For radeonsi these seem to have been somewhat broken for over a
year, and as of recently they cause the driver to crash.

This patch adds a CAP for the filters and enables the CAP for all
driver except radeonsi.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99549
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105026
---
 src/gallium/docs/source/screen.rst   |  2 ++
 src/gallium/drivers/etnaviv/etnaviv_screen.c |  1 +
 src/gallium/drivers/freedreno/freedreno_screen.c |  1 +
 src/gallium/drivers/i915/i915_screen.c   |  1 +
 src/gallium/drivers/llvmpipe/lp_screen.c |  1 +
 src/gallium/drivers/nouveau/nv30/nv30_screen.c   |  1 +
 src/gallium/drivers/nouveau/nv50/nv50_screen.c   |  1 +
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   |  1 +
 src/gallium/drivers/r300/r300_screen.c   |  1 +
 src/gallium/drivers/r600/r600_pipe.c |  1 +
 src/gallium/drivers/radeonsi/si_get.c|  1 +
 src/gallium/drivers/softpipe/sp_screen.c |  1 +
 src/gallium/drivers/svga/svga_screen.c   |  1 +
 src/gallium/drivers/swr/swr_screen.cpp   |  1 +
 src/gallium/drivers/vc4/vc4_screen.c |  1 +
 src/gallium/drivers/vc5/vc5_screen.c |  1 +
 src/gallium/drivers/virgl/virgl_screen.c |  2 ++
 src/gallium/include/pipe/p_defines.h |  1 +
 src/gallium/state_trackers/dri/dri_screen.c  | 15 ---
 19 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/src/gallium/docs/source/screen.rst 
b/src/gallium/docs/source/screen.rst
index 3837360fb40..22aba928580 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -420,6 +420,8 @@ The integer capabilities:
   by the driver, and the driver can throw assertion failures.
 * ``PIPE_CAP_PACKED_UNIFORMS``: True if the driver supports packed uniforms
   as opposed to padding to vec4s.
+* ``PIPE_CAP_PP_FILTERS``: True if the driver supports the postprocess filters
+  available in gallium.
 
 
 .. _pipe_capf:
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c 
b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index 2ae4e86c631..d277ac834db 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -140,6 +140,7 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
case PIPE_CAP_TGSI_TEXCOORD:
case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
+   case PIPE_CAP_PP_FILTERS:
   return 1;
case PIPE_CAP_NATIVE_FENCE_FD:
   return screen->drm_version >= ETNA_DRM_VERSION_FENCE_FD;
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c 
b/src/gallium/drivers/freedreno/freedreno_screen.c
index f338d756dfe..42ab87514d8 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -186,6 +186,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
case PIPE_CAP_TEXTURE_BARRIER:
case PIPE_CAP_INVALIDATE_BUFFER:
+   case PIPE_CAP_PP_FILTERS:
return 1;
 
case PIPE_CAP_VERTEXID_NOBASE:
diff --git a/src/gallium/drivers/i915/i915_screen.c 
b/src/gallium/drivers/i915/i915_screen.c
index 59d2ec66284..8564a8567e4 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -205,6 +205,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap 
cap)
case PIPE_CAP_VERTEX_COLOR_CLAMPED:
case PIPE_CAP_USER_VERTEX_BUFFERS:
case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
+   case PIPE_CAP_PP_FILTERS:
   return 1;
 
/* Unsupported features (boolean caps). */
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c 
b/src/gallium/drivers/llvmpipe/lp_screen.c
index 3f5d0327bf9..9290d3ec869 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -110,6 +110,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum 
pipe_cap param)
case PIPE_CAP_NPOT_TEXTURES:
case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
+   case PIPE_CAP_PP_FILTERS:
   return 1;
case PIPE_CAP_SM3:
   return 1;
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c 
b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
index 1d1fbaad607..d3afd0cf493 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
@@ -94,6 +94,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
+   case PIPE_CAP_PP_FILTERS:
   return 1;
/* nv35 capabilities */
case PIPE_CAP_DEPTH_BOUNDS_TEST:
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c