[Mesa-dev] [PATCH 2/2] draw: implement pipeline statistics in the draw module

Zack Rusin zackr at vmware.com
Fri Apr 12 07:06:26 PDT 2013


----- Original Message -----
> I wonder if, instead of sending statistics down the pipe with through vbuf,
> it would be simpler to just have
> 
>    void draw_statistics_start(struct draw_context *draw)
>    void draw_statistics_end(struct draw_context *draw,
>                             struct pipe_query_data_pipeline_statistics
>                             *out_statistics)
> 
> It seems to me that thist would map nicely to the pipe query calls.  Of
> course, the setup/fragment statistics would need to be filled independently,
> and the draw module would need to flush in these calls.

I started this way and ended up rewriting it because I didn't like the fact that the interface was different than for the stream-output queries. I figured that if we'll be switching we'll need to switch both, otherwise the interface is just going to be a mess. Also, from the users of the module it comes down to the same thing - that draw module gives it the statistics for the current run, how the callers handle that data is really independent of the interface.

> This would also allow to accumulate multiple statistics across multiple draws
> nicely, and probably less overhead.

That's a feature that's important. I implemented it on top of this patch with the simple diff I'm attaching (I'd merge them both into a single pass but it's going to be easier for everyone to see what's going on with just the diff).

z
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multi_stats.diff
Type: text/x-patch
Size: 7788 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130412/ff657448/attachment.bin>


More information about the mesa-dev mailing list