[Mesa-dev] [PATCH resend] mesa: Add core support for the GL_AMD_performance_monitor extension.

Kenneth Graunke kenneth at whitecape.org
Mon Apr 22 11:54:50 PDT 2013


On 04/13/2013 11:07 AM, Christoph Bumiller wrote:
> On 12.04.2013 21:14, Kenneth Graunke wrote:
>> This provides an interface for applications (and OpenGL-based tools) to
>> access GPU performance counters.  Since the exact performance counters
>> available vary between vendors and hardware generations, the extension
>> provides an API the application can use to get the names, types, and
>> minimum/maximum values of all available counters.  Counters are also
>> organized into groups.
>>
>> +   /**
>> +    * \name Performance monitors
>> +    */
>> +   /*@{*/
>> +   struct gl_perf_monitor_object * (*NewPerfMonitor)(void);
>> +   void (*DeletePerfMonitor)(struct gl_perf_monitor_object *m);
>
> Could we get a gl_context for these as well ? It might be useful since
> if we want allocate or destroy (more likely) gallium objects we'll need
> a context.
> NewQueryObject has a context argument as well.
>
> I could save the context from the Begin/End calls, but if there's no
> reason not to pass a context to New/Delete, having it as arg would be
> preferable.
>
> Regards,
> Christoph

Sure thing!  I just didn't pass it because I didn't need it.  I've 
updated the patch to pass gl_context to every driver hook.


More information about the mesa-dev mailing list