summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_resource_texture.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-03-04 15:59:32 -0700
committerBrian Paul <[email protected]>2016-03-07 09:33:15 -0700
commit3af78b426ee05f9515439c20fc416202bff4539c (patch)
tree8415a5a9ea4d47b510fc4566a2cc06ee9f94baaa /src/gallium/drivers/svga/svga_resource_texture.c
parent7e8cf3454624213f27b01f43ea6317d3bb51bb90 (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_resource_texture.c')
-rw-r--r--src/gallium/drivers/svga/svga_resource_texture.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c
index e898ff2c4e6..1edb41dabee 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.c
+++ b/src/gallium/drivers/svga/svga_resource_texture.c
@@ -463,8 +463,10 @@ svga_texture_transfer_map(struct pipe_context *pipe,
assert(transfer->usage & PIPE_TRANSFER_WRITE);
if ((transfer->usage & PIPE_TRANSFER_UNSYNCHRONIZED) == 0) {
svga_surfaces_flush(svga);
- if (!sws->surface_is_flushed(sws, surf))
+ if (!sws->surface_is_flushed(sws, surf)) {
+ svga->hud.surface_write_flushes++;
svga_context_flush(svga, NULL);
+ }
}
}
}