diff options
| author | Zack Rusin <zackr@vmware.com> | 2013-04-11 06:11:29 -0700 |
|---|---|---|
| committer | Zack Rusin <zackr@vmware.com> | 2013-04-16 23:38:47 -0700 |
| commit | 80ee4a407a2668f6a6a410c3e56ae9910510f773 (patch) | |
| tree | fef704d3c130eb615a0e9f4d9631288d45513749 /src/gallium/auxiliary/draw/draw_context.c | |
| parent | b739376cffec19870804b1ebd4bef3c2f654e943 (diff) | |
| download | external_mesa3d-80ee4a407a2668f6a6a410c3e56ae9910510f773.tar.gz external_mesa3d-80ee4a407a2668f6a6a410c3e56ae9910510f773.tar.bz2 external_mesa3d-80ee4a407a2668f6a6a410c3e56ae9910510f773.zip | |
draw: implement pipeline statistics in the draw module
This is a basic implementation of the pipeline statistics in the
draw module. The interface is similar to the stream output statistics
and also requires that the callers explicitly enable it.
Included is the implementation of the interface in llvmpipe and
softpipe. Only softpipe enables the pipeline statistics capability
though because llvmpipe is lacking gathering of the fragment shading
and rasterization statistics.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
| -rw-r--r-- | src/gallium/auxiliary/draw/draw_context.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index 2fb9bacf4c..0f98021247 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -842,3 +842,19 @@ draw_get_shader_param(unsigned shader, enum pipe_shader_cap param) return draw_get_shader_param_no_llvm(shader, param); } +/** + * Enables or disables collection of statistics. + * + * Draw module is capable of generating statistics for the vertex + * processing pipeline. Collection of that data isn't free and so + * it's disabled by default. The users of the module can enable + * (or disable) this functionality through this function. + * The actual data will be emitted through the VBUF interface, + * the 'pipeline_statistics' callback to be exact. + */ +void +draw_collect_pipeline_statistics(struct draw_context *draw, + boolean enable) +{ + draw->collect_statistics = enable; +} |
