[Mesa-dev] [PATCH 01/14] gallium: add PIPE_CAP_MAX_SHADER_PATCH_VARYINGS

Ilia Mirkin imirkin at alum.mit.edu
Wed Jun 17 08:54:06 PDT 2015


There appears to be a tabs/spaces screwup in vc4_screen.c, otherwise
this patch is

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

Could I trouble you to land this sooner rather than later? The
gallium-side driver impl depends on this too. I guess I could just
carry it in my nvc0-tess tree as well.

On Tue, Jun 16, 2015 at 7:04 PM, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> ---
>  src/gallium/docs/source/screen.rst               | 4 ++++
>  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/vc4/vc4_screen.c             | 1 +
>  src/gallium/include/pipe/p_defines.h             | 1 +
>  15 files changed, 18 insertions(+)
>
> diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
> index 8f64817..e88af38 100644
> --- a/src/gallium/docs/source/screen.rst
> +++ b/src/gallium/docs/source/screen.rst
> @@ -254,6 +254,10 @@ The integer capabilities:
>    and size must be page-aligned.
>  * ``PIPE_CAP_DEVICE_RESET_STATUS_QUERY``:
>    Whether pipe_context::get_device_reset_status is implemented.
> +* ``PIPE_CAP_MAX_SHADER_PATCH_VARYINGS``:
> +  How many per-patch outputs and inputs are supported between tessellation
> +  control and tessellation evaluation shaders, not counting in TESSINNER and
> +  TESSOUTER. The minimum allowed value for OpenGL is 30.
>
>
>  .. _pipe_capf:
> diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
> index 6a5748c..e6ccfe5 100644
> --- a/src/gallium/drivers/freedreno/freedreno_screen.c
> +++ b/src/gallium/drivers/freedreno/freedreno_screen.c
> @@ -221,6 +221,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>         case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:
>         case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
>         case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
> +       case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
>                 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 0590da0..de0798a 100644
> --- a/src/gallium/drivers/i915/i915_screen.c
> +++ b/src/gallium/drivers/i915/i915_screen.c
> @@ -243,6 +243,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
>     case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:
>     case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
>     case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
> +   case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
>        return 0;
>
>     case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
> diff --git a/src/gallium/drivers/ilo/ilo_screen.c b/src/gallium/drivers/ilo/ilo_screen.c
> index b75a259..9efa581 100644
> --- a/src/gallium/drivers/ilo/ilo_screen.c
> +++ b/src/gallium/drivers/ilo/ilo_screen.c
> @@ -457,6 +457,7 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param)
>     case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:
>     case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
>     case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
> +   case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
>        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 47f1897..37f6cbe 100644
> --- a/src/gallium/drivers/llvmpipe/lp_screen.c
> +++ b/src/gallium/drivers/llvmpipe/lp_screen.c
> @@ -292,6 +292,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
>     case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:
>     case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
>     case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
> +   case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
>        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 2e38a19..039f703 100644
> --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> @@ -162,6 +162,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>     case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:
>     case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
>     case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
> +   case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
>        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 6583a35..c32ad01 100644
> --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
> +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
> @@ -210,6 +210,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>     case PIPE_CAP_MULTISAMPLE_Z_RESOLVE: /* potentially supported on some hw */
>     case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
>     case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
> +   case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
>        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 5936d05..b4429da 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> @@ -194,6 +194,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>     case PIPE_CAP_VERTEXID_NOBASE:
>     case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
>     case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
> +   case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
>        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 a7bca91..4fd0e9f 100644
> --- a/src/gallium/drivers/r300/r300_screen.c
> +++ b/src/gallium/drivers/r300/r300_screen.c
> @@ -191,6 +191,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>          case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:
>          case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
>          case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
> +        case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
>              return 0;
>
>          /* SWTCL-only features. */
> diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
> index e122b60..286ca3f 100644
> --- a/src/gallium/drivers/r600/r600_pipe.c
> +++ b/src/gallium/drivers/r600/r600_pipe.c
> @@ -333,6 +333,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>         case PIPE_CAP_SAMPLER_VIEW_TARGET:
>         case PIPE_CAP_VERTEXID_NOBASE:
>         case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
> +       case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
>                 return 0;
>
>         /* Stream output. */
> diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
> index 53ae71a..15b005e 100644
> --- a/src/gallium/drivers/radeonsi/si_pipe.c
> +++ b/src/gallium/drivers/radeonsi/si_pipe.c
> @@ -294,6 +294,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>         case PIPE_CAP_SAMPLER_VIEW_TARGET:
>         case PIPE_CAP_VERTEXID_NOBASE:
>         case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
> +       case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
>                 return 0;
>
>         case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
> diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
> index a688d31..ed8e545 100644
> --- a/src/gallium/drivers/softpipe/sp_screen.c
> +++ b/src/gallium/drivers/softpipe/sp_screen.c
> @@ -242,6 +242,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
>     case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:
>     case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
>     case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
> +   case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
>        return 0;
>     }
>     /* should only get here on unhandled cases */
> diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
> index 56e4867..69a50fd 100644
> --- a/src/gallium/drivers/svga/svga_screen.c
> +++ b/src/gallium/drivers/svga/svga_screen.c
> @@ -309,6 +309,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
>     case PIPE_CAP_UMA:
>     case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
>     case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
> +   case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
>        return 0;
>     }
>
> diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c
> index f63bead..c069454 100644
> --- a/src/gallium/drivers/vc4/vc4_screen.c
> +++ b/src/gallium/drivers/vc4/vc4_screen.c
> @@ -176,6 +176,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>          case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:
>          case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
>          case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
> +       case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
>                  return 0;
>
>                  /* Stream output. */
> diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
> index 88b7b76..4ef8b0a 100644
> --- a/src/gallium/include/pipe/p_defines.h
> +++ b/src/gallium/include/pipe/p_defines.h
> @@ -605,6 +605,7 @@ enum pipe_cap
>     PIPE_CAP_MULTISAMPLE_Z_RESOLVE,
>     PIPE_CAP_RESOURCE_FROM_USER_MEMORY,
>     PIPE_CAP_DEVICE_RESET_STATUS_QUERY,
> +   PIPE_CAP_MAX_SHADER_PATCH_VARYINGS,
>  };
>
>  #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)
> --
> 2.1.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list