Re: [Mesa-dev] Mesa: Fix performance query id check

2017-02-24 Thread Robert Bragg
Ah, oops, I think the id types iterated a few times over the lifetime of the original patch. E.g. until pretty much the last moment before landing it pass a signed int id to the backend. I suppose it can be return queryid != 0 && queryid_to_index(queryid) < numQueries I'll also look to update the

Re: [Mesa-dev] Mesa: Fix performance query id check

2017-02-24 Thread Juha-Pekka Heikkila
Oops. Original code can never fail on zero id but my patch is also wrong. Please ignore this patch. /Juha-Pekka On 24.02.2017 15:10, Juha-Pekka Heikkila wrote: In queryid_valid() index is unsigned so checking if it is less than zero is useless. On queryid_to_index() is comment saying 0 is rese

[Mesa-dev] Mesa: Fix performance query id check

2017-02-24 Thread Juha-Pekka Heikkila
In queryid_valid() index is unsigned so checking if it is less than zero is useless. On queryid_to_index() is comment saying 0 is reserved to be invalid thus rule it out. CC: Robert Bragg Signed-off-by: Juha-Pekka Heikkila --- src/mesa/main/performance_query.c | 2 +- 1 file changed, 1 insertio