[Mesa-dev] [PATCH 09/15] freedreno: implement pipe_screen::get_driver_query_group_info
Rob Clark
robdclark at gmail.com
Wed Mar 11 05:18:27 PDT 2015
On Wed, Mar 11, 2015 at 4:19 AM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>
>
> On 03/11/2015 12:30 AM, Rob Clark wrote:
>>
>> On Mon, Mar 9, 2015 at 5:09 PM, Samuel Pitoiset
>> <samuel.pitoiset at gmail.com> wrote:
>>>
>>> This enables GL_AMD_performance_monitor for freedreno.
>>>
>>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>>> ---
>>> src/gallium/drivers/freedreno/freedreno_query.c | 9 +++++++++
>>> src/gallium/drivers/freedreno/freedreno_query.h | 1 +
>>> 2 files changed, 10 insertions(+)
>>>
>>> diff --git a/src/gallium/drivers/freedreno/freedreno_query.c
>>> b/src/gallium/drivers/freedreno/freedreno_query.c
>>> index db2683c..13973a8 100644
>>> --- a/src/gallium/drivers/freedreno/freedreno_query.c
>>> +++ b/src/gallium/drivers/freedreno/freedreno_query.c
>>> @@ -28,6 +28,7 @@
>>>
>>> #include "pipe/p_state.h"
>>> #include "util/u_memory.h"
>>> +#include "util/u_query.h"
>>>
>>> #include "freedreno_query.h"
>>> #include "freedreno_query_sw.h"
>>> @@ -104,10 +105,18 @@ fd_get_driver_query_info(struct pipe_screen
>>> *pscreen,
>>> return 1;
>>> }
>>>
>>> +static int
>>> +fd_get_driver_query_group_info(struct pipe_screen *pscreen,
>>> + unsigned index, struct pipe_driver_query_group_info *info)
>>> +{
>>> + return util_get_driver_query_group_info(index, FD_QUERY_COUNT,
>>> info);
>>> +}
>>> +
>>> void
>>> fd_query_screen_init(struct pipe_screen *pscreen)
>>> {
>>> pscreen->get_driver_query_info = fd_get_driver_query_info;
>>> + pscreen->get_driver_query_group_info =
>>> fd_get_driver_query_group_info;
>>> }
>>>
>>> void
>>> diff --git a/src/gallium/drivers/freedreno/freedreno_query.h
>>> b/src/gallium/drivers/freedreno/freedreno_query.h
>>> index c2c71da..9cee989 100644
>>> --- a/src/gallium/drivers/freedreno/freedreno_query.h
>>> +++ b/src/gallium/drivers/freedreno/freedreno_query.h
>>> @@ -56,6 +56,7 @@ fd_query(struct pipe_query *pq)
>>> return (struct fd_query *)pq;
>>> }
>>>
>>> +#define FD_QUERY_COUNT 6
>>
>> I *think* this should be 5 (but I could be misunderstanding the patchset)
>
>
> According to the number of queries exposed through pipe_driver_query_info(),
> it's 6 not 5.
>
> http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/freedreno/freedreno_query.c#n88
>
ahh, nevermind then.. from quick skim of the patches on the other
drivers, I had gotten the mistaken idea that the # was based on # of
driver specific queries, not including the generic queries
>>
>> jfwiw, it might be easier to review to put the count's at the bottom
>> of the list of queries, rather than top..
>
>
> Yes, sure.
>
>
maybe disregard that point, since I thought it had to do with the # of
driver specific queries
BR,
-R
>>
>> BR,
>> -R
>>
>>> #define FD_QUERY_DRAW_CALLS (PIPE_QUERY_DRIVER_SPECIFIC + 0)
>>> #define FD_QUERY_BATCH_TOTAL (PIPE_QUERY_DRIVER_SPECIFIC + 1) /*
>>> total # of batches (submits) */
>>> #define FD_QUERY_BATCH_SYSMEM (PIPE_QUERY_DRIVER_SPECIFIC + 2) /*
>>> batches using system memory (GMEM bypass) */
>>> --
>>> 2.3.1
>>>
>>> _______________________________________________
>>> 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