[Mesa-dev] [PATCH] gallium: add PIPE_CAP_QUERY_PIPELINE_STATISTICS
Marek Olšák
maraeo at gmail.com
Fri Mar 29 07:36:31 PDT 2013
Reviewed-by: Marek Olšák <maraeo at gmail.com>
Marek
On Fri, Mar 29, 2013 at 1:05 PM, Christoph Bumiller <
e0425955 at student.tuwien.ac.at> wrote:
> ---
> 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/llvmpipe/lp_screen.c | 2 ++
> src/gallium/drivers/nv30/nv30_screen.c | 1 +
> src/gallium/drivers/nv50/nv50_screen.c | 2 ++
> src/gallium/drivers/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/radeonsi_pipe.c | 1 +
> src/gallium/drivers/softpipe/sp_screen.c | 2 ++
> src/gallium/include/pipe/p_defines.h | 3 ++-
> 12 files changed, 17 insertions(+), 1 deletions(-)
>
> diff --git a/src/gallium/docs/source/screen.rst
> b/src/gallium/docs/source/screen.rst
> index 8c7e86e..c1a3c0b 100644
> --- a/src/gallium/docs/source/screen.rst
> +++ b/src/gallium/docs/source/screen.rst
> @@ -149,6 +149,8 @@ The integer capabilities:
> to use a blit to implement a texture transfer which needs format
> conversions
> and swizzling in state trackers. Generally, all hardware drivers with
> dedicated memory should return 1 and all software rasterizers should
> return 0.
> +* ``PIPE_CAP_QUERY_PIPELINE_STATISTICS``: Whether
> PIPE_QUERY_PIPELINE_STATISTICS
> + is supported.
>
>
> .. _pipe_capf:
> diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c
> b/src/gallium/drivers/freedreno/freedreno_screen.c
> index 79eef5e..283d07f 100644
> --- a/src/gallium/drivers/freedreno/freedreno_screen.c
> +++ b/src/gallium/drivers/freedreno/freedreno_screen.c
> @@ -199,6 +199,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum
> pipe_cap param)
> case PIPE_CAP_VERTEX_COLOR_CLAMPED:
> case PIPE_CAP_USER_VERTEX_BUFFERS:
> case PIPE_CAP_USER_INDEX_BUFFERS:
> + case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
> return 0;
>
> /* Stream output. */
> diff --git a/src/gallium/drivers/i915/i915_screen.c
> b/src/gallium/drivers/i915/i915_screen.c
> index 13aa91c..54b2154 100644
> --- a/src/gallium/drivers/i915/i915_screen.c
> +++ b/src/gallium/drivers/i915/i915_screen.c
> @@ -210,6 +210,7 @@ i915_get_param(struct pipe_screen *screen, enum
> pipe_cap cap)
> case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
> case PIPE_CAP_START_INSTANCE:
> case PIPE_CAP_QUERY_TIMESTAMP:
> + case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
> case PIPE_CAP_TEXTURE_MULTISAMPLE:
> case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
> return 0;
> diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c
> b/src/gallium/drivers/llvmpipe/lp_screen.c
> index e8c6ab1..6700887 100644
> --- a/src/gallium/drivers/llvmpipe/lp_screen.c
> +++ b/src/gallium/drivers/llvmpipe/lp_screen.c
> @@ -130,6 +130,8 @@ llvmpipe_get_param(struct pipe_screen *screen, enum
> pipe_cap param)
> return 0;
> case PIPE_CAP_QUERY_TIMESTAMP:
> return 1;
> + case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
> + return 0;
> case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
> return 1;
> case PIPE_CAP_TEXTURE_SHADOW_MAP:
> diff --git a/src/gallium/drivers/nv30/nv30_screen.c
> b/src/gallium/drivers/nv30/nv30_screen.c
> index 4084869..e33710e 100644
> --- a/src/gallium/drivers/nv30/nv30_screen.c
> +++ b/src/gallium/drivers/nv30/nv30_screen.c
> @@ -122,6 +122,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen,
> enum pipe_cap param)
> case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
> case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
> case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
> + case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
> return 0;
> case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
> case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
> diff --git a/src/gallium/drivers/nv50/nv50_screen.c
> b/src/gallium/drivers/nv50/nv50_screen.c
> index 0a20ae3..53eeeb6 100644
> --- a/src/gallium/drivers/nv50/nv50_screen.c
> +++ b/src/gallium/drivers/nv50/nv50_screen.c
> @@ -189,6 +189,8 @@ nv50_screen_get_param(struct pipe_screen *pscreen,
> enum pipe_cap param)
> return 0;
> case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
> return 1;
> + case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
> + return 0;
> default:
> NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
> return 0;
> diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c
> b/src/gallium/drivers/nvc0/nvc0_screen.c
> index 5b9385a..3a32539 100644
> --- a/src/gallium/drivers/nvc0/nvc0_screen.c
> +++ b/src/gallium/drivers/nvc0/nvc0_screen.c
> @@ -136,6 +136,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen,
> enum pipe_cap param)
> case PIPE_CAP_QUERY_TIME_ELAPSED:
> case PIPE_CAP_OCCLUSION_QUERY:
> case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
> + case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
> return 1;
> case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
> return 4;
> diff --git a/src/gallium/drivers/r300/r300_screen.c
> b/src/gallium/drivers/r300/r300_screen.c
> index bd16c3b..3175b3b 100644
> --- a/src/gallium/drivers/r300/r300_screen.c
> +++ b/src/gallium/drivers/r300/r300_screen.c
> @@ -135,6 +135,7 @@ static int r300_get_param(struct pipe_screen* pscreen,
> enum pipe_cap param)
>
> /* Unsupported features. */
> case PIPE_CAP_QUERY_TIME_ELAPSED:
> + case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
> case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
> case PIPE_CAP_INDEP_BLEND_ENABLE:
> case PIPE_CAP_INDEP_BLEND_FUNC:
> diff --git a/src/gallium/drivers/r600/r600_pipe.c
> b/src/gallium/drivers/r600/r600_pipe.c
> index 443a91e..1e4c964 100644
> --- a/src/gallium/drivers/r600/r600_pipe.c
> +++ b/src/gallium/drivers/r600/r600_pipe.c
> @@ -602,6 +602,7 @@ static int r600_get_param(struct pipe_screen* pscreen,
> enum pipe_cap param)
> case PIPE_CAP_VERTEX_COLOR_CLAMPED:
> case PIPE_CAP_USER_VERTEX_BUFFERS:
> case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
> + case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
> return 0;
>
> /* Stream output. */
> diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.c
> b/src/gallium/drivers/radeonsi/radeonsi_pipe.c
> index 0d24309..f9e9b97 100644
> --- a/src/gallium/drivers/radeonsi/radeonsi_pipe.c
> +++ b/src/gallium/drivers/radeonsi/radeonsi_pipe.c
> @@ -357,6 +357,7 @@ static int r600_get_param(struct pipe_screen* pscreen,
> enum pipe_cap param)
> case PIPE_CAP_TEXTURE_MULTISAMPLE:
> case PIPE_CAP_COMPUTE:
> case PIPE_CAP_QUERY_TIMESTAMP:
> + case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
> case PIPE_CAP_CUBE_MAP_ARRAY:
> case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
> case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
> diff --git a/src/gallium/drivers/softpipe/sp_screen.c
> b/src/gallium/drivers/softpipe/sp_screen.c
> index 0261c69..6915f91 100644
> --- a/src/gallium/drivers/softpipe/sp_screen.c
> +++ b/src/gallium/drivers/softpipe/sp_screen.c
> @@ -86,6 +86,8 @@ softpipe_get_param(struct pipe_screen *screen, enum
> pipe_cap param)
> return 1;
> case PIPE_CAP_QUERY_TIME_ELAPSED:
> return 1;
> + case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
> + return 0;
> case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
> return 1;
> case PIPE_CAP_TEXTURE_SHADOW_MAP:
> diff --git a/src/gallium/include/pipe/p_defines.h
> b/src/gallium/include/pipe/p_defines.h
> index 51694ea..5b00acc 100644
> --- a/src/gallium/include/pipe/p_defines.h
> +++ b/src/gallium/include/pipe/p_defines.h
> @@ -504,7 +504,8 @@ enum pipe_cap {
> PIPE_CAP_TEXTURE_BUFFER_OBJECTS = 77,
> PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 78,
> PIPE_CAP_TGSI_TEXCOORD = 79,
> - PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER = 80
> + PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER = 80,
> + PIPE_CAP_QUERY_PIPELINE_STATISTICS = 81
> };
>
> /**
> --
> 1.7.3.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130329/e3562a5d/attachment.html>
More information about the mesa-dev
mailing list