[Mesa-dev] [PATCH] radv: query cmds should mark a cmd buffer as having draws.

Edward O'Callaghan funfunctor at folklore1984.net
Wed Feb 15 01:05:26 UTC 2017


Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>

On 02/15/2017 11:00 AM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> This fixes a regression with the remove non-draw cmd buffers in
> queries.
> 
> Fixes: 8b47b97215a radv: detect command buffers that do no work and drop them (v2)
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/amd/vulkan/radv_query.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c
> index a29a05d..fd5d065 100644
> --- a/src/amd/vulkan/radv_query.c
> +++ b/src/amd/vulkan/radv_query.c
> @@ -211,6 +211,7 @@ void radv_CmdCopyQueryPoolResults(
>  
>  	cmd_buffer->device->ws->cs_add_buffer(cmd_buffer->cs, pool->bo, 8);
>  	cmd_buffer->device->ws->cs_add_buffer(cmd_buffer->cs, dst_buffer->bo, 8);
> +	cmd_buffer->no_draws = false;
>  
>  	for(unsigned i = 0; i < queryCount; ++i, dest_va += stride) {
>  		unsigned query = firstQuery + i;
> @@ -310,6 +311,7 @@ void radv_CmdBeginQuery(
>  	va += pool->stride * query;
>  
>  	cmd_buffer->device->ws->cs_add_buffer(cs, pool->bo, 8);
> +	cmd_buffer->no_draws = false;
>  
>  	switch (pool->type) {
>  	case VK_QUERY_TYPE_OCCLUSION:
> @@ -343,6 +345,7 @@ void radv_CmdEndQuery(
>  	va += pool->stride * query;
>  
>  	cmd_buffer->device->ws->cs_add_buffer(cs, pool->bo, 8);
> +	cmd_buffer->no_draws = false;
>  
>  	switch (pool->type) {
>  	case VK_QUERY_TYPE_OCCLUSION:
> @@ -394,6 +397,7 @@ void radv_CmdWriteTimestamp(
>  	uint64_t query_va = va + pool->stride * query;
>  
>  	cmd_buffer->device->ws->cs_add_buffer(cs, pool->bo, 5);
> +	cmd_buffer->no_draws = false;
>  
>  	MAYBE_UNUSED unsigned cdw_max = radeon_check_space(cmd_buffer->device->ws, cs, 12);
>  
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170215/26a128fd/attachment.sig>


More information about the mesa-dev mailing list