[Mesa-dev] [PATCH 08/15] svga: implement pipe_screen::get_driver_query_group_info v3
Brian Paul
brianp at vmware.com
Wed Jul 9 06:00:20 PDT 2014
On 07/09/2014 08:34 AM, Samuel Pitoiset wrote:
> This enables GL_AMD_performance_monitor for svga.
>
> V2:
> - s/pipe_context/pipe_screen in the commit msg
>
> V3:
> - use util_get_driver_query_group_info
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/gallium/drivers/svga/svga_screen.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
> index f34664d..29257ab 100644
> --- a/src/gallium/drivers/svga/svga_screen.c
> +++ b/src/gallium/drivers/svga/svga_screen.c
> @@ -28,6 +28,7 @@
> #include "util/u_inlines.h"
> #include "util/u_string.h"
> #include "util/u_math.h"
> +#include "util/u_query.h"
>
> #include "svga_winsys.h"
> #include "svga_public.h"
> @@ -555,6 +556,15 @@ svga_get_driver_query_info(struct pipe_screen *screen,
> }
>
>
> +static int
> +svga_get_driver_query_group_info(struct pipe_screen *screen,
> + unsigned index,
> + struct pipe_driver_query_group_info *info)
> +{
> + return util_get_driver_query_group_info(index, 3, info);
What does 3 indicate? Please add some documentation for this.
I suspect it's the number of driver-specific queries supported. If so,
it would be better to have a new #define SVGA_QUERY_COUNT 3 in
svga_context.h so that if someone adds a new query they won't have to
hunt down this magic number here.
Thanks.
> +}
> +
> +
> static void
> svga_destroy_screen( struct pipe_screen *screen )
> {
> @@ -615,6 +625,7 @@ svga_screen_create(struct svga_winsys_screen *sws)
> screen->fence_signalled = svga_fence_signalled;
> screen->fence_finish = svga_fence_finish;
> screen->get_driver_query_info = svga_get_driver_query_info;
> + screen->get_driver_query_group_info = svga_get_driver_query_group_info;
> svgascreen->sws = sws;
>
> svga_init_screen_resource_functions(svgascreen);
>
More information about the mesa-dev
mailing list