diff options
author | Brian Paul <[email protected]> | 2016-02-29 14:25:09 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-03-04 07:57:41 -0700 |
commit | 1258f907f4f8371391ad7e30ae7365c223203a97 (patch) | |
tree | 980aae2b0f45ccbfe121e709422452559534a54e /src/gallium/winsys | |
parent | 6fc8d90fa97f7cce059b1046d76b31d266f06a92 (diff) |
svga: add new svga_winsys_context::get_command_buffer_size()
To ask how large the current command buffer is. Will be used for
a new GALLIUM_HUD graph.
Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/svga/drm/vmw_context.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/winsys/svga/drm/vmw_context.c b/src/gallium/winsys/svga/drm/vmw_context.c index dae121e4053..8d23bff5d74 100644 --- a/src/gallium/winsys/svga/drm/vmw_context.c +++ b/src/gallium/winsys/svga/drm/vmw_context.c @@ -315,6 +315,13 @@ vmw_swc_reserve(struct svga_winsys_context *swc, return vswc->command.buffer + vswc->command.used; } +static unsigned +vmw_swc_get_command_buffer_size(struct svga_winsys_context *swc) +{ + const struct vmw_svga_winsys_context *vswc = vmw_svga_winsys_context(swc); + return vswc->command.used; +} + static void vmw_swc_context_relocation(struct svga_winsys_context *swc, uint32 *cid) @@ -761,6 +768,7 @@ vmw_svga_winsys_context_create(struct svga_winsys_screen *sws) vswc->base.destroy = vmw_swc_destroy; vswc->base.reserve = vmw_swc_reserve; + vswc->base.get_command_buffer_size = vmw_swc_get_command_buffer_size; vswc->base.surface_relocation = vmw_swc_surface_relocation; vswc->base.region_relocation = vmw_swc_region_relocation; vswc->base.mob_relocation = vmw_swc_mob_relocation; |