[Mesa-dev] [PATCH 1/2] radv/wsi: fix app that acquire multiple images up front

Edward O'Callaghan funfunctor at folklore1984.net
Thu Oct 13 02:46:13 UTC 2016


Both patches are,
Acked-by: Edward O'Callaghan <funfunctor at folklore1984.net>

On 10/13/2016 01:44 PM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> dota2 does multiple acquires followed by multiple queues,
> this bug manifested itself as a hang in the xshmfence code
> randomly when dota2 was doing it's menus. It also occured
> when running dota2 under phoronix-test-suite.
> 
> The fix is once the image is acquired to mark it busy then
> so nobody else can acquire. We have to trust vulkan apps
> that they will eventually submit it.
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/amd/vulkan/radv_wsi_wayland.c | 1 +
>  src/amd/vulkan/radv_wsi_x11.c     | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/src/amd/vulkan/radv_wsi_wayland.c b/src/amd/vulkan/radv_wsi_wayland.c
> index 2b4a3d3..5ce2e9e 100644
> --- a/src/amd/vulkan/radv_wsi_wayland.c
> +++ b/src/amd/vulkan/radv_wsi_wayland.c
> @@ -521,6 +521,7 @@ wsi_wl_swapchain_acquire_next_image(struct radv_swapchain *radv_chain,
>  			if (!chain->images[i].busy) {
>  				/* We found a non-busy image */
>  				*image_index = i;
> +				chain->images[image_index].busy = true;
>  				return VK_SUCCESS;
>  			}
>  		}
> diff --git a/src/amd/vulkan/radv_wsi_x11.c b/src/amd/vulkan/radv_wsi_x11.c
> index 0aae2a3..9cd0db0 100644
> --- a/src/amd/vulkan/radv_wsi_x11.c
> +++ b/src/amd/vulkan/radv_wsi_x11.c
> @@ -579,6 +579,7 @@ x11_acquire_next_image(struct radv_swapchain *radv_chain,
>  				/* We found a non-busy image */
>  				xshmfence_await(chain->images[i].shm_fence);
>  				*image_index = i;
> +				chain->images[i].busy = true;
>  				return VK_SUCCESS;
>  			}
>  		}
> 

-------------- 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/20161013/31025975/attachment-0001.sig>


More information about the mesa-dev mailing list