diff options
author | Brian Paul <[email protected]> | 2016-03-04 15:59:32 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-03-07 09:33:15 -0700 |
commit | 3af78b426ee05f9515439c20fc416202bff4539c (patch) | |
tree | 8415a5a9ea4d47b510fc4566a2cc06ee9f94baaa /src/gallium/drivers/svga/svga_pipe_query.c | |
parent | 7e8cf3454624213f27b01f43ea6317d3bb51bb90 (diff) |
svga: add new surface-write-flushes HUD query
To know when we're flushing the command buffer because we need to
write to surface in the command buffer.
Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_pipe_query.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_pipe_query.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_query.c b/src/gallium/drivers/svga/svga_pipe_query.c index 15decd49853..845f4ef3a1c 100644 --- a/src/gallium/drivers/svga/svga_pipe_query.c +++ b/src/gallium/drivers/svga/svga_pipe_query.c @@ -729,6 +729,7 @@ svga_create_query(struct pipe_context *pipe, case SVGA_QUERY_NUM_BYTES_UPLOADED: case SVGA_QUERY_COMMAND_BUFFER_SIZE: case SVGA_QUERY_FLUSH_TIME: + case SVGA_QUERY_SURFACE_WRITE_FLUSHES: case SVGA_QUERY_MEMORY_USED: case SVGA_QUERY_NUM_SHADERS: case SVGA_QUERY_NUM_RESOURCES: @@ -800,6 +801,7 @@ svga_destroy_query(struct pipe_context *pipe, struct pipe_query *q) case SVGA_QUERY_NUM_BYTES_UPLOADED: case SVGA_QUERY_COMMAND_BUFFER_SIZE: case SVGA_QUERY_FLUSH_TIME: + case SVGA_QUERY_SURFACE_WRITE_FLUSHES: case SVGA_QUERY_MEMORY_USED: case SVGA_QUERY_NUM_SHADERS: case SVGA_QUERY_NUM_RESOURCES: @@ -894,6 +896,9 @@ svga_begin_query(struct pipe_context *pipe, struct pipe_query *q) case SVGA_QUERY_FLUSH_TIME: sq->begin_count = svga->hud.flush_time; break; + case SVGA_QUERY_SURFACE_WRITE_FLUSHES: + sq->begin_count = svga->hud.surface_write_flushes; + break; case SVGA_QUERY_MEMORY_USED: case SVGA_QUERY_NUM_SHADERS: case SVGA_QUERY_NUM_RESOURCES: @@ -994,6 +999,9 @@ svga_end_query(struct pipe_context *pipe, struct pipe_query *q) case SVGA_QUERY_FLUSH_TIME: sq->end_count = svga->hud.flush_time; break; + case SVGA_QUERY_SURFACE_WRITE_FLUSHES: + sq->end_count = svga->hud.surface_write_flushes; + break; case SVGA_QUERY_MEMORY_USED: case SVGA_QUERY_NUM_SHADERS: case SVGA_QUERY_NUM_RESOURCES: @@ -1094,6 +1102,7 @@ svga_get_query_result(struct pipe_context *pipe, case SVGA_QUERY_NUM_BYTES_UPLOADED: case SVGA_QUERY_COMMAND_BUFFER_SIZE: case SVGA_QUERY_FLUSH_TIME: + case SVGA_QUERY_SURFACE_WRITE_FLUSHES: vresult->u64 = sq->end_count - sq->begin_count; break; /* These are running total counters */ |