[Mesa-dev] [PATCH 2/2] radv: fix cdw check vs tracing emit

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Jul 27 07:45:18 UTC 2018


Series is:

Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

On 07/27/2018 06:22 AM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> If we have tracing enabled we could do all the tracing emits
> and overflow the precalculated cdw_max.
> ---
>   src/amd/vulkan/radv_cmd_buffer.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
> index f9f57a10656..aba3a835daa 100644
> --- a/src/amd/vulkan/radv_cmd_buffer.c
> +++ b/src/amd/vulkan/radv_cmd_buffer.c
> @@ -1752,10 +1752,10 @@ radv_flush_descriptors(struct radv_cmd_buffer *cmd_buffer,
>   	descriptors_state->dirty = 0;
>   	descriptors_state->push_dirty = false;
>   
> +	assert(cmd_buffer->cs->cdw <= cdw_max);
> +
>   	if (unlikely(cmd_buffer->device->trace_bo))
>   		radv_save_descriptors(cmd_buffer, bind_point);
> -
> -	assert(cmd_buffer->cs->cdw <= cdw_max);
>   }
>   
>   static void
> 


More information about the mesa-dev mailing list