radv: detect command buffers that do no work and drop them (v2)
authorDave Airlie <airlied@redhat.com>
Fri, 10 Feb 2017 00:20:44 +0000 (00:20 +0000)
committerDave Airlie <airlied@redhat.com>
Mon, 13 Feb 2017 20:00:28 +0000 (20:00 +0000)
commit8b47b97215af7157bc15676167cab73aa5a61a76
tree451ff29b67e73101485e0d4a90238965e71ead45
parentd49d275c415d60ae08dc3e52d8db11f19a44010f
radv: detect command buffers that do no work and drop them (v2)

If a buffer is just full of flushes we flush things on command
buffer submission, so don't bother submitting these.

This will reduce some CPU overhead on dota2, which submits a fair
few command streams that don't end up drawing anything.

v2: reorganise loop to count first then malloc,
rename some vars (Bas)

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_meta_buffer.c
src/amd/vulkan/radv_private.h
src/amd/vulkan/si_cmd_buffer.c