[Mesa-dev] [PATCH 4/6] gallium: add a cap to determine whether the driver supports offset_clamp
Roland Scheidegger
sroland at vmware.com
Mon Feb 2 07:11:07 PST 2015
Please add some bit about this in screen.rst gallium docs.
Other than that 4/6 and 5/6 are
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Am 01.02.2015 um 16:18 schrieb Ilia Mirkin:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
> src/gallium/drivers/freedreno/freedreno_screen.c | 1 +
> src/gallium/drivers/i915/i915_screen.c | 1 +
> src/gallium/drivers/ilo/ilo_screen.c | 2 ++
> src/gallium/drivers/llvmpipe/lp_screen.c | 2 ++
> 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 | 2 ++
> src/gallium/drivers/svga/svga_screen.c | 1 +
> src/gallium/drivers/vc4/vc4_screen.c | 1 +
> src/gallium/include/pipe/p_defines.h | 3 ++-
> 14 files changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
> index 084a0ec..b7bb859 100644
> --- a/src/gallium/drivers/freedreno/freedreno_screen.c
> +++ b/src/gallium/drivers/freedreno/freedreno_screen.c
> @@ -229,6 +229,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
> case PIPE_CAP_SAMPLER_VIEW_TARGET:
> case PIPE_CAP_CLIP_HALFZ:
> case PIPE_CAP_VERTEXID_NOBASE:
> + case PIPE_CAP_POLYGON_OFFSET_CLAMP:
> 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 1277de3..bbc901e 100644
> --- a/src/gallium/drivers/i915/i915_screen.c
> +++ b/src/gallium/drivers/i915/i915_screen.c
> @@ -227,6 +227,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
> case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
> case PIPE_CAP_CLIP_HALFZ:
> case PIPE_CAP_VERTEXID_NOBASE:
> + case PIPE_CAP_POLYGON_OFFSET_CLAMP:
> 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 0c948f4..5048ba1 100644
> --- a/src/gallium/drivers/ilo/ilo_screen.c
> +++ b/src/gallium/drivers/ilo/ilo_screen.c
> @@ -497,6 +497,8 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param)
> return true;
> case PIPE_CAP_VERTEXID_NOBASE:
> return false;
> + case PIPE_CAP_POLYGON_OFFSET_CLAMP:
> + return true;
>
> default:
> return 0;
> diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
> index 0e4456a..3b31656 100644
> --- a/src/gallium/drivers/llvmpipe/lp_screen.c
> +++ b/src/gallium/drivers/llvmpipe/lp_screen.c
> @@ -284,6 +284,8 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
> return 1;
> case PIPE_CAP_VERTEXID_NOBASE:
> return 0;
> + case PIPE_CAP_POLYGON_OFFSET_CLAMP:
> + return 1;
> }
> /* should only get here on unhandled cases */
> debug_printf("Unexpected PIPE_CAP %d query\n", param);
> diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> index 46c21a1..0a403ba 100644
> --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
> @@ -158,6 +158,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
> case PIPE_CAP_SAMPLER_VIEW_TARGET:
> case PIPE_CAP_CLIP_HALFZ:
> case PIPE_CAP_VERTEXID_NOBASE:
> + case PIPE_CAP_POLYGON_OFFSET_CLAMP:
> 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 da237f9..072a7a2 100644
> --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
> +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
> @@ -174,6 +174,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
> case PIPE_CAP_SAMPLER_VIEW_TARGET:
> case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
> case PIPE_CAP_CLIP_HALFZ:
> + case PIPE_CAP_POLYGON_OFFSET_CLAMP:
> return 1;
> case PIPE_CAP_SEAMLESS_CUBE_MAP:
> return 1; /* class_3d >= NVA0_3D_CLASS; */
> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> index 1d7caf8..cba19db 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
> @@ -172,6 +172,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
> case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
> case PIPE_CAP_SAMPLER_VIEW_TARGET:
> case PIPE_CAP_CLIP_HALFZ:
> + case PIPE_CAP_POLYGON_OFFSET_CLAMP:
> return 1;
> case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
> return (class_3d >= NVE4_3D_CLASS) ? 1 : 0;
> diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
> index f82010d..434f4c4 100644
> --- a/src/gallium/drivers/r300/r300_screen.c
> +++ b/src/gallium/drivers/r300/r300_screen.c
> @@ -182,6 +182,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
> case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
> case PIPE_CAP_SAMPLER_VIEW_TARGET:
> case PIPE_CAP_VERTEXID_NOBASE:
> + case PIPE_CAP_POLYGON_OFFSET_CLAMP:
> return 0;
>
> /* SWTCL-only features. */
> diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
> index b6f7859..e3df024 100644
> --- a/src/gallium/drivers/r600/r600_pipe.c
> +++ b/src/gallium/drivers/r600/r600_pipe.c
> @@ -267,6 +267,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
> case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
> case PIPE_CAP_SAMPLE_SHADING:
> case PIPE_CAP_CLIP_HALFZ:
> + case PIPE_CAP_POLYGON_OFFSET_CLAMP:
> return 1;
>
> case PIPE_CAP_COMPUTE:
> diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
> index eb2b785..eff8d69 100644
> --- a/src/gallium/drivers/radeonsi/si_pipe.c
> +++ b/src/gallium/drivers/radeonsi/si_pipe.c
> @@ -226,6 +226,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
> case PIPE_CAP_DRAW_INDIRECT:
> case PIPE_CAP_CLIP_HALFZ:
> case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION:
> + case PIPE_CAP_POLYGON_OFFSET_CLAMP:
> return 1;
>
> case PIPE_CAP_TEXTURE_MULTISAMPLE:
> diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
> index 8efc88f..9aefb88 100644
> --- a/src/gallium/drivers/softpipe/sp_screen.c
> +++ b/src/gallium/drivers/softpipe/sp_screen.c
> @@ -233,6 +233,8 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
> return 1;
> case PIPE_CAP_VERTEXID_NOBASE:
> return 0;
> + case PIPE_CAP_POLYGON_OFFSET_CLAMP:
> + return 0;
> }
> /* should only get here on unhandled cases */
> debug_printf("Unexpected PIPE_CAP %d query\n", param);
> diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
> index 32578c8..9e190e2 100644
> --- a/src/gallium/drivers/svga/svga_screen.c
> +++ b/src/gallium/drivers/svga/svga_screen.c
> @@ -283,6 +283,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
> case PIPE_CAP_SAMPLER_VIEW_TARGET:
> case PIPE_CAP_CLIP_HALFZ:
> case PIPE_CAP_VERTEXID_NOBASE:
> + case PIPE_CAP_POLYGON_OFFSET_CLAMP:
> return 0;
> case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
> return 64;
> diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c
> index 8d21633..9b5d7ba 100644
> --- a/src/gallium/drivers/vc4/vc4_screen.c
> +++ b/src/gallium/drivers/vc4/vc4_screen.c
> @@ -170,6 +170,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
> case PIPE_CAP_SAMPLER_VIEW_TARGET:
> case PIPE_CAP_CLIP_HALFZ:
> case PIPE_CAP_VERTEXID_NOBASE:
> + case PIPE_CAP_POLYGON_OFFSET_CLAMP:
> return 0;
>
> /* Stream output. */
> diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
> index 6c5703a..fd32c4a 100644
> --- a/src/gallium/include/pipe/p_defines.h
> +++ b/src/gallium/include/pipe/p_defines.h
> @@ -572,7 +572,8 @@ enum pipe_cap {
> PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE = 109,
> PIPE_CAP_SAMPLER_VIEW_TARGET = 110,
> PIPE_CAP_CLIP_HALFZ = 111,
> - PIPE_CAP_VERTEXID_NOBASE,
> + PIPE_CAP_VERTEXID_NOBASE = 112,
> + PIPE_CAP_POLYGON_OFFSET_CLAMP = 113,
> };
>
> #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)
>
More information about the mesa-dev
mailing list