[Mesa-dev] [PATCH 4/7] gallium: add PIPE_CAP_TGSI_FS_FBFETCH

Gustaw Smolarczyk wielkiegie at gmail.com
Mon Jan 2 14:21:41 UTC 2017


2017-01-02 7:01 GMT+01:00 Ilia Mirkin <imirkin at alum.mit.edu>:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>  src/gallium/docs/source/screen.rst               | 2 ++
>  src/gallium/drivers/freedreno/freedreno_screen.c | 1 +
>  src/gallium/drivers/i915/i915_screen.c           | 1 +
>  src/gallium/drivers/ilo/ilo_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_pipe.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/virgl/virgl_screen.c         | 1 +
>  src/gallium/include/pipe/p_defines.h             | 1 +
>  17 files changed, 18 insertions(+)
>
> diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
> index 86aa259..5e561ca 100644
> --- a/src/gallium/docs/source/screen.rst
> +++ b/src/gallium/docs/source/screen.rst
> @@ -366,6 +366,8 @@ The integer capabilities:
>    ARB_transform_feedback3.
>  * ``PIPE_CAP_TGSI_CAN_READ_OUTPUTS``: Whether every TGSI shader stage can read
>    from the output file.
> +* ``PIPE_CAP_TGSI_FS_FBFETCH``: Whether a fragment shader can use the FBFETCH
> +  opcode to retrieve the current value in the framebuffer.
>
>
>  .. _pipe_capf:
> diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
> index d84cd82..4d0981e 100644
> --- a/src/gallium/drivers/freedreno/freedreno_screen.c
> +++ b/src/gallium/drivers/freedreno/freedreno_screen.c
> @@ -295,6 +295,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>         case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
>         case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
>         case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
> +       case PIPE_CAP_TGSI_FS_FBFETCH:
>                 return 0;
>
>         case PIPE_CAP_MAX_VIEWPORTS:
> diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
> index 14f4271..1f13e4d 100644
> --- a/src/gallium/drivers/i915/i915_screen.c
> +++ b/src/gallium/drivers/i915/i915_screen.c
> @@ -296,6 +296,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
>     case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
>     case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
>     case PIPE_CAP_NATIVE_FENCE_FD:
> +   case PIPE_CAP_TGSI_FS_FBFETCH:
>        return 0;
>
>     case PIPE_CAP_MAX_VIEWPORTS:
> diff --git a/src/gallium/drivers/ilo/ilo_screen.c b/src/gallium/drivers/ilo/ilo_screen.c
> index c3fad73..93509bb 100644
> --- a/src/gallium/drivers/ilo/ilo_screen.c
> +++ b/src/gallium/drivers/ilo/ilo_screen.c
> @@ -519,6 +519,7 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param)
>     case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
>     case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
>     case PIPE_CAP_NATIVE_FENCE_FD:
> +   case PIPE_CAP_TGSI_FS_FBFETCH:
>        return 0;
>
>     case PIPE_CAP_VENDOR_ID:
> diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
> index 83045cd..3d8acdc 100644
> --- a/src/gallium/drivers/llvmpipe/lp_screen.c
> +++ b/src/gallium/drivers/llvmpipe/lp_screen.c
> @@ -340,6 +340,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
>     case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
>     case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
>     case PIPE_CAP_NATIVE_FENCE_FD:
> +   case PIPE_CAP_TGSI_FS_FBFETCH:
>        return 0;
>     }
>     /* should only get here on unhandled cases */
> diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> index beffeac..759fc23 100644
> --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> @@ -205,6 +205,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>     case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
>     case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
>     case PIPE_CAP_NATIVE_FENCE_FD:
> +   case PIPE_CAP_TGSI_FS_FBFETCH:
>        return 0;
>
>     case PIPE_CAP_VENDOR_ID:
> diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
> index 22da3c9..0cfdb3c 100644
> --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
> +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
> @@ -259,6 +259,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>     case PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERS:
>     case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
>     case PIPE_CAP_NATIVE_FENCE_FD:
> +   case PIPE_CAP_TGSI_FS_FBFETCH:
>        return 0;
>
>     case PIPE_CAP_VENDOR_ID:
> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> index 2526a14..fe637af 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> @@ -276,6 +276,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>     case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
>     case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
>     case PIPE_CAP_NATIVE_FENCE_FD:
> +   case PIPE_CAP_TGSI_FS_FBFETCH:
>        return 0;
>
>     case PIPE_CAP_VENDOR_ID:
> diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
> index d6e3aa4..f9d4d2f 100644
> --- a/src/gallium/drivers/r300/r300_screen.c
> +++ b/src/gallium/drivers/r300/r300_screen.c
> @@ -227,6 +227,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>          case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
>          case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
>          case PIPE_CAP_NATIVE_FENCE_FD:
> +        case PIPE_CAP_TGSI_FS_FBFETCH:
>              return 0;
>
>          /* SWTCL-only features. */
> diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
> index b99da22..6c803b1 100644
> --- a/src/gallium/drivers/r600/r600_pipe.c
> +++ b/src/gallium/drivers/r600/r600_pipe.c
> @@ -376,6 +376,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>         case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
>         case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
>         case PIPE_CAP_NATIVE_FENCE_FD:
> +       case PIPE_CAP_TGSI_FS_FBFETCH:
>                 return 0;
>
>         case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
> diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
> index 11cca6f..208bb80 100644
> --- a/src/gallium/drivers/radeonsi/si_pipe.c
> +++ b/src/gallium/drivers/radeonsi/si_pipe.c
> @@ -413,6 +413,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>         case PIPE_CAP_CULL_DISTANCE:
>         case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
>         case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
> +       case PIPE_CAP_TGSI_FS_FBFETCH:
>                 return 1;

Are you sure?

Regards,
Gustaw


More information about the mesa-dev mailing list