Re: [Mesa-dev] [PATCH 1/3] st/mesa: Make an enum for pipeline statistics query result indices.

2018-12-21 Thread Roland Scheidegger
Am 22.12.18 um 01:21 schrieb Ilia Mirkin: > > > On Fri, Dec 21, 2018, 19:16 Marek Olšák wrote: > > > > On Fri, Dec 21, 2018, 6:28 PM Kenneth Graunke wrote: > > That seems like a reasonable interface to me. > >

Re: [Mesa-dev] [PATCH 1/3] st/mesa: Make an enum for pipeline statistics query result indices.

2018-12-21 Thread Ilia Mirkin
On Fri, Dec 21, 2018, 19:16 Marek Olšák > > On Fri, Dec 21, 2018, 6:28 PM Kenneth Graunke wrote: > >> That seems like a reasonable interface to me. >> >> But, I don't think it's backwards compatible. Today, don't state >> trackers set index = 0 and expect all 11 to be returned? We could >>

Re: [Mesa-dev] [PATCH 1/3] st/mesa: Make an enum for pipeline statistics query result indices.

2018-12-21 Thread Marek Olšák
On Fri, Dec 21, 2018, 6:28 PM Kenneth Graunke That seems like a reasonable interface to me. > > But, I don't think it's backwards compatible. Today, don't state > trackers set index = 0 and expect all 11 to be returned? We could > easily change the in-tree state trackers, but not sure about the

Re: [Mesa-dev] [PATCH 1/3] st/mesa: Make an enum for pipeline statistics query result indices.

2018-12-21 Thread Kenneth Graunke
That seems like a reasonable interface to me. But, I don't think it's backwards compatible. Today, don't state trackers set index = 0 and expect all 11 to be returned? We could easily change the in-tree state trackers, but not sure about the other ones. We could always encode the index

Re: [Mesa-dev] [PATCH 1/3] st/mesa: Make an enum for pipeline statistics query result indices.

2018-12-21 Thread Marek Olšák
The series looks good. Another way to distinguish between return one and return all is to use "index". index <= 11 returns one. index == ~0 returns all. This is the least intrusive. st/mesa and gallium/hud always want to get one. st/nine and util/u_helpers always want to get all. Marek On Sat,

Re: [Mesa-dev] [PATCH 1/3] st/mesa: Make an enum for pipeline statistics query result indices.

2018-12-15 Thread Roland Scheidegger
Am 15.12.18 um 22:39 schrieb Ilia Mirkin: > On Sat, Dec 15, 2018 at 4:12 PM Kenneth Graunke wrote: >> >> On Saturday, December 15, 2018 9:10:46 AM PST Ilia Mirkin wrote: >>> On Sat, Dec 15, 2018 at 4:45 AM Kenneth Graunke >>> wrote: Gallium handles pipeline statistics queries as a single

Re: [Mesa-dev] [PATCH 1/3] st/mesa: Make an enum for pipeline statistics query result indices.

2018-12-15 Thread Ilia Mirkin
On Sat, Dec 15, 2018 at 4:12 PM Kenneth Graunke wrote: > > On Saturday, December 15, 2018 9:10:46 AM PST Ilia Mirkin wrote: > > On Sat, Dec 15, 2018 at 4:45 AM Kenneth Graunke > > wrote: > > > Gallium handles pipeline statistics queries as a single query > > > (PIPE_QUERY_PIPELINE_STATISTICS)

Re: [Mesa-dev] [PATCH 1/3] st/mesa: Make an enum for pipeline statistics query result indices.

2018-12-15 Thread Kenneth Graunke
On Saturday, December 15, 2018 9:10:46 AM PST Ilia Mirkin wrote: > On Sat, Dec 15, 2018 at 4:45 AM Kenneth Graunke wrote: > > Gallium handles pipeline statistics queries as a single query > > (PIPE_QUERY_PIPELINE_STATISTICS) which returns a struct with 11 values. > > Sometimes it's useful to

Re: [Mesa-dev] [PATCH 1/3] st/mesa: Make an enum for pipeline statistics query result indices.

2018-12-15 Thread Ilia Mirkin
On Sat, Dec 15, 2018 at 4:45 AM Kenneth Graunke wrote: > Gallium handles pipeline statistics queries as a single query > (PIPE_QUERY_PIPELINE_STATISTICS) which returns a struct with 11 values. > Sometimes it's useful to refer to each of those values individually, > rather than as a group. To

[Mesa-dev] [PATCH 1/3] st/mesa: Make an enum for pipeline statistics query result indices.

2018-12-15 Thread Kenneth Graunke
Gallium handles pipeline statistics queries as a single query (PIPE_QUERY_PIPELINE_STATISTICS) which returns a struct with 11 values. Sometimes it's useful to refer to each of those values individually, rather than as a group. To avoid hardcoding numbers, we define a new enum for each value.