[Mesa-stable] [PATCH] radv: disable conditional rendering for vkCmdCopyQueryPoolResults()

Juan A. Suarez Romero jasuarez at igalia.com
Thu Nov 8 10:46:49 UTC 2018


On Mon, 2018-11-05 at 09:54 +0100, Samuel Pitoiset wrote:
> VK_EXT_conditional_rendering says that copy commands should not be
> affected by conditional rendering.
> 
> Cc: 18.2 18.3 <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>


This patch didn't apply cleanly on 18.2, so I've resolved the trivial conflicts.

Fixed patch is in 
https://gitlab.freedesktop.org/mesa/mesa/commit/cbd9b4a95d8f502ed22e2377f0b6196dfe9a450d


	J.A.

> ---
>  src/amd/vulkan/radv_query.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c
> index 494dc24016..067c8e062a 100644
> --- a/src/amd/vulkan/radv_query.c
> +++ b/src/amd/vulkan/radv_query.c
> @@ -913,6 +913,7 @@ static void radv_query_shader(struct radv_cmd_buffer *cmd_buffer,
>  {
>  	struct radv_device *device = cmd_buffer->device;
>  	struct radv_meta_saved_state saved_state;
> +	bool old_predicating;
>  
>  	if (!*pipeline) {
>  		VkResult ret = radv_device_init_meta_query_state_internal(device);
> @@ -927,6 +928,12 @@ static void radv_query_shader(struct radv_cmd_buffer *cmd_buffer,
>  		       RADV_META_SAVE_CONSTANTS |
>  		       RADV_META_SAVE_DESCRIPTORS);
>  
> +	/* VK_EXT_conditional_rendering says that copy commands should not be
> +	 * affected by conditional rendering.
> +	 */
> +	old_predicating = cmd_buffer->state.predicating;
> +	cmd_buffer->state.predicating = false;
> +
>  	struct radv_buffer dst_buffer = {
>  		.bo = dst_bo,
>  		.offset = dst_offset,
> @@ -1005,6 +1012,9 @@ static void radv_query_shader(struct radv_cmd_buffer *cmd_buffer,
>  
>  	radv_unaligned_dispatch(cmd_buffer, count, 1, 1);
>  
> +	/* Restore conditional rendering. */
> +	cmd_buffer->state.predicating = old_predicating;
> +
>  	radv_meta_restore(&saved_state, cmd_buffer);
>  }
>  



More information about the mesa-stable mailing list